Implement some Int <-> Double conversions.