I'm with @rofl0r at this point. These casts look nasty...
but looking at the code it seems to be the best way to make the necessary operations.
Either we live with the cast or we could introduce a union or some macro magic to confuse more people ;)

or do you have a nice solution @rofl0r ?