SerializeHexReal (FUN) ¶ FUNCTION SerializeHexReal : STRING(32) Converts a floating point number to the format R16#{Mantissa}H{Exponent} where both mantissa and exponent are hexadecimal numerals, such that liM * 2^iE = {Mantissa} * 16^{Exponent}. Note If uE is zero, {Exponent} is set to 0, regardless of the value of uE. The hexadecimal exponent is computed as floor(iE/4). The hexadecimal mantissa then becomes liM * 2^(iE mod 4). See also DeSerializeHexReal. InOut: Scope Name Type Comment Return SerializeHexReal STRING(32) Input liM LINT The (signed) mantissa iE INT The (unbiased) exponent
LREAL ¶ GetLRealSpecialVal (Function) IsLRealNaN (Function) IsLRealNegInfinity (Function) IsLRealNumber (Function) IsLRealPosInfinity (Function)
GetLRealSpecialVal (FUN) ¶ FUNCTION GetLRealSpecialVal : LREAL Returns one of the predefined special LREAL values. InOut: Scope Name Type Return GetLRealSpecialVal LREAL Input sv ESpecial_FP_Value
IsLRealNaN (FUN) ¶ FUNCTION IsLRealNaN : BOOL Returns whether the given LREAL value is a special NaN (not a number) value. InOut: Scope Name Type Return IsLRealNaN BOOL Input f LREAL
IsLRealNegInfinity (FUN) ¶ FUNCTION IsLRealNegInfinity : BOOL Returns whether the given LREAL value is a special negative infinity value. InOut: Scope Name Type Return IsLRealNegInfinity BOOL Input f LREAL
IsRealNumber (FUN) ¶ FUNCTION IsRealNumber : BOOL Returns whether the given REAL value is a regular number and not a special NaN or infinity value. InOut: Scope Name Type Return IsRealNumber BOOL Input f REAL
IsRealPosInfinity (FUN) ¶ FUNCTION IsRealPosInfinity : BOOL Returns whether the given REAL value is a special positive infinity value. InOut: Scope Name Type Return IsRealPosInfinity BOOL Input f REAL
StringFunctions ¶ HexStrToLReal (Function) HexStrToReal (Function) LRealToHexStr (Function) LRealToStr (Function) RealToHexStr (Function) RealToStr (Function) StrToLReal (Function) StrToReal (Function)
HexStrToLReal (FUN) ¶ FUNCTION HexStrToLReal : BOOL Converts a HexReal-string to a LREAL value. See DeserializeHexReal for a description of the format. Note This function also handles the case LREAL = REAL. InOut: Scope Name Type Comment Return HexStrToLReal BOOL Input str STRING The string to convert Output f LREAL
HexStrToReal (FUN) ¶ FUNCTION HexStrToReal : BOOL Converts a HexReal-string to a REAL value. See DeserializeHexReal for a description of the format. InOut: Scope Name Type Comment Return HexStrToReal BOOL Input str STRING The string to convert Output f REAL