DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Floating point operations

Conversion of floating point formats to integer

IEEE requires floating point to integer format conversions to be affected by the current rounding mode. However, the C language requires these conversions to be done by truncation (which is the same as round-to-zero). In the C compilation system floating point to integer conversions are done by truncation.

Conversion of floating point numbers to integers should signal integer overflow or invalid operation for an overflow condition. In the current implementation the integer overflow flag is set, but there is no way to enable the overflow trap. Enabling the integer overflow trap would result in a substantial performance penalty due to stalled pipeline effects.


Next topic: Square root
Previous topic: IEEE requirements

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003