Spooky:
I'd use the pack function, as described in:
...roboticus
In reply to Re: packing a floating point by roboticus in thread packing a floating point by Spooky