fixed decimalToFloatingPoint method