Skip to main content

Module float

Module float 

Source
Expand description

Moves between fixed-point decimal and COMP-1/COMP-2, and floating-point intermediates. Each conversion here is an assumption: see crate::assumptions::FLOAT_FROM_DECIMAL, crate::assumptions::FLOAT_TO_DECIMAL and crate::assumptions::FLOAT_NARROWING_ROUNDS.

Functions§

from_fixed
narrow
narrow_rounded
A floating-point value stored into a narrower COMP-1 or COMP-2: LOAD ROUNDED (p. 52).
to_fixed
The fixed-point value a receiver of places gets, and whether it overflowed (ON SIZE ERROR).
to_receiver
A floating-point value moved or stored into a fixed-point receiver of places, and whether it overflowed (ON SIZE ERROR): rounded in the receiver’s low-order position, short precision giving at most 9 significant digits and long at most 18, the rest zero (Programming Guide SC27-8714-03, p. 52).