Converting floating-point values to integers
This chapter treats the important subject of converting arbitrary floating-point numbers to whole numbers, where the results may be in either floating-point or integer data formats. A few important historical machines targeted at the scientific computing market, and described in Appendix H on page 947, make such conversions easy by virtue of not having a separate integer storage format. Integers are then just floating-point values with a zero exponent, and conversions may require little more than bit shifting, and possibly, rounding. Some scripting languages provide only numbers and strings, where all numbers are represented as floating-point values.
Unable to display preview. Download preview PDF.