ESpecial_FP_Value (ENUM) ¶ TYPE ESpecial_FP_Value : Enumeration of special floating point values InOut: Name Initial Comment NaN 0 A (quiet) NaN PosInf 1 Positive infinity NegInf 2 Negative infinity Eps 3 Smallest positive number MaxVal 4 The maximum representable value MinVal 5 The minimum representable value
Functions ¶ Ceil (Function) CeilF (Function) Floor (Function) FloorF (Function) Truncate (Function) TruncateF (Function)
Ceil (FUN) ¶ FUNCTION Ceil : LREAL Returns the smallest integral value that is not less than f. If f is +0, -0, infinity, or NaN, then f is returned. Note This function also handles the case LREAL = REAL. InOut: Scope Name Type Input f LREAL Return Ceil LREAL
CeilF (FUN) ¶ FUNCTION CeilF : REAL Returns the smallest integral value that is not less than f. If f is +0, -0, infinity, or NaN, then f is returned. InOut: Scope Name Type Input f REAL Return CeilF REAL
Floor (FUN) ¶ FUNCTION Floor : LREAL Returns the greatest integral value that is not greater than f. if f is +0, -0, infinity, or NaN, then f is returned. Note This function also handles the case LREAL = REAL. InOut: Scope Name Type Input f LREAL Return Floor LREAL
FloorF (FUN) ¶ FUNCTION FloorF : REAL Returns the greatest integral value that is not greater than f. If f is +0, -0, infinity, or NaN, then f is returned. InOut: Scope Name Type Input f REAL Return FloorF REAL
Truncate (FUN) ¶ FUNCTION Truncate : LREAL Round to the next integral value, towards zero. if f is integral, infinity, or NaN, then f is returned. Note This function also handles the case LREAL = REAL. InOut: Scope Name Type Input f LREAL Return Truncate LREAL
TruncateF (FUN) ¶ FUNCTION TruncateF : REAL Round to the next integral value, towards zero. If f is integral, infinity, or NaN, then f is returned. InOut: Scope Name Type Input f REAL Return TruncateF REAL
HexReal ¶ DeserializeHexReal (Function) SerializeHexReal (Function)
DeserializeHexReal (FUN) ¶ FUNCTION DeserializeHexReal : BOOL Converts a string of the format R16#{Mantissa}H{Exponent} | R16#NaN | R16#+Inf | R16#-Inf where both mantissa and exponent are hexadecimal numerals, such that liM * 2^iE = {Mantissa} * 16^{Exponent}. Returns true on success and false if the format is invalid or if an overflow occurred (i.e. when the mantissa does not fit into an LINT or the exponent does not fit into an INT.) Note Leading whitespace is not allowed. Any characters that come after the hex real are ignored. See also SerializeHexReal. InOut: Scope Name Type Comment Return DeserializeHexReal BOOL Input ps POINTER TO BYTE Pointer to the input string Output liM LINT The (signed) mantissa iE INT The (unbiased) exponent xNaN BOOL True iff ps^ is ‘F16#NaN’, iE and diM are 0 in this case xInf BOOL True iff ps^ is ‘F16#+Inf’ of ‘F16#-Inf’, diM = 1 for +Infinity and -1 for -Infinity, iE is 0