摘要 |
A method, system, and computer program product that convert a real number from a floating point representation to a character string. Mantissa bits are extracted from the floating-point representation of a value into an integer format. The mantissa bits of the integer format may be shifted left by a number of positions that is equal to a base 2 exponent of a first representation of the value. Prior to converting the value, the floating-point representation of the value can be divided by 2<SUP>n</SUP>, where n is the number of the mantissa bits in the floating-point representation of the value. A set of operations can then be performed to convert a result of the division to a number greater than or equal to 1.0 and less than 10.0. The set of operations may include multiplication operations and/or retrieving a constant from a lookup table.
|