Fast floating-point truncation to integer form
Abstract
A processor representation of a floating-point data item is converted to a representation of a truncated integer item, without changing the rounding mode of a processor. When the current rounding mode is unknown, the floating-point item is converted to an integer representation in whatever mode the processor happens to be in. One of multiple correction values is applied, in response to the sign of the original data, a difference between the integer and the original data, and whether the item is an integer. When the current rounding mode is known, the processor produces two integer representations, and selects one or the other of them as an output integer data item, in response to the sign of the original item and the relative sizes of the two representations.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 5 · Forward citations: 21.
Claims (1 — 1 Independent, 0 Dependent)
- Claim 1Independent Claim
A method of converting a floating-point input data item into a truncated integer output data item in a programmed digital data processor having multiple rounding modes including a round-to-even mode, without modifying the rounding mode of the processor, comprising: if the rounding mode of the processor is currently round-to-even, determining a property of the input floating-point representation; producing at least two intermediate floating-point representations from the input floating-point representation; converting the intermediate floating-point representations to intermediate integer repre
Technical Overview & Description
Full multi-page specification text is archived at the issuing office. Read complete official specification ↗