GetRoundingType Function
Get the Current Rounding Type.

Unit
QESBPCSMath

Declaration
Function GetRoundingType: TESBRoundingType;

Description
ertBankers - This is the default. 5 is rounded to the nearest even. When ever the Maths Processor is Initialised it returns to this state.

ertDown - 5 is always rounded down.

ertUp - 5 us always rounded up.

ertChop - Rounding always Truncates.

Category
Arithmetic Routines for Floats

Implementation

function GetRoundingType: TESBRoundingType;
var
     CW: TESBBitList;
     B: Byte;
begin
     CW := Get87ControlWord;
     if BitIsSet (CW, 11) then
          B := 2
     else
          B := 0;
     if BitIsSet (CW, 10) then
          B := B + 1;
     Result := TESBRoundingType (B);
End;


HTML generated by Time2HELP
http://www.time2help.com