@timbray I am happy to write it up if you like, but Ivan has it, except that int64(u) not a float-to-int case, it's an unsigned-to-signed cast.
I've been doing quite a bit of low level bit magic in my sparse strip GPU path rendering implementation. That really needs a writeup!