add function for converting between integer representation and floating point number