handle conversion between float and double types in decoder