Binary-decimal conversion

The IEEE standards require that all arithmetic operations other than binary-decimal conversion be correctly rounded. Binary-decimal conversion is subject to a relaxed specification that guarantees sufficiently close approximation at reasonable performance. Since the adoption of the standards the state of the art has advanced to where it is possible to produce correctly rounded radix conversions at reasonable cost. The CommonPoint computational model specifies correctly rounded conversions.

Correctly rounded conversions are easy, in principle. Any positive binary floating-point value can also be expressed as a fixed-point number of the form , where the i bits are the integer part and the f bits are the fraction part. If the exponent e is near the limits of the exponent range, the integer part could be very large or the fraction part very small, but there is just a p-bit-wide sequence of nonzero bits, limited by the precision of the floating-point format.

Conversion of the fraction part to decimal is just a matter of successively multiplying the binary fraction by ten; the decimal fraction digits appear from left to right. Conversion of the integer part proceeds by successively dividing by 10; the integer digits appear from right to left.


[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker