TSingleHelper
[Properties (by Name)][Methods (by Name)][Events (by Name)]
Helper for Single floating point type
Declaration
Source position: syshelph.inc line 201
Type
  TSingleHelper = type helper type for Single
  private
    function GetB(AIndex: Cardinal) : Byte;
    function GetW(AIndex: Cardinal) : Word;
    function GetE : QWord;
    function GetF : QWord;
    function GetS : Boolean;
    procedure SetB(AIndex: Cardinal; const AValue: Byte);
    procedure SetW(AIndex: Cardinal; const AValue: Word);
    procedure SetE(AValue: QWord);
    procedure SetF(AValue: QWord);
    procedure SetS(AValue: Boolean);
  public
    Epsilon : Single = 1.4012984643248170709e-45;
    MaxValue : Single = 340282346638528859811704183484516925440.0;
    MinValue : Single = - 340282346638528859811704183484516925440.0;
    PositiveInfinity : Single = 1.0 / 0.0;
    NegativeInfinity : Single = (- 1.0) / (0.0);
    NaN : Single = 0.0 / 0.0;
    class function IsNan(const AValue: Single) : Boolean;  Overload;  Static;
    function IsNan : Boolean;  Overload;
    class function IsInfinity(const AValue: Single) : Boolean;  Overload
                             ;  Static;
    function IsInfinity : Boolean;  Overload;
    class function IsNegativeInfinity(const AValue: Single) : Boolean
                                     ;  Overload;  Static;
    function IsNegativeInfinity : Boolean;  Overload;
    class function IsPositiveInfinity(const AValue: Single) : Boolean
                                     ;  Overload;  Static;
    function IsPositiveInfinity : Boolean;  Overload;
    class function Parse(const AString: string) : Single;  Overload;  Static;
    class function Parse(const AString: string; 
                        const AFormatSettings: TFormatSettings) : Single
                        ;  Overload;  Static;
    class function Size : Integer;  Static;
    class function ToString(const AValue: Single) : string;  Overload
                           ;  Static;
    class function ToString(const AValue: Single; 
                           const AFormatSettings: TFormatSettings) : string
                           ;  Overload;  Static;
    class function ToString(const AValue: Single; 
                           const AFormat: TFloatFormat; 
                           const APrecision: Integer; 
                           const ADigits: Integer) : string;  Overload
                           ;  Static;
    class function ToString(const AValue: Single; 
                           const AFormat: TFloatFormat; 
                           const APrecision: Integer; 
                           const ADigits: Integer; 
                           const AFormatSettings: TFormatSettings) : string
                           ;  Overload;  Static;
    function ToString(const AFormat: TFloatFormat; 
                     const APrecision: Integer; const ADigits: Integer)
                      : string;  Overload;
    function ToString(const AFormat: TFloatFormat; 
                     const APrecision: Integer; const ADigits: Integer; 
                     const AFormatSettings: TFormatSettings) : string
                     ;  Overload;
    function ToString(const AFormatSettings: TFormatSettings) : string
                     ;  Overload;
    function ToString : string;  Overload;
    class function TryParse(const AString: string; out AValue: Single)
                            : Boolean;  Overload;  Static;
    class function TryParse(const AString: string; out AValue: Single; 
                           const AFormatSettings: TFormatSettings) : Boolean
                           ;  Overload;  Static;
    procedure BuildUp(const ASignFlag: Boolean; const AMantissa: QWord; 
                     const AExponent: Integer);
    function Exponent : Integer;
    function Fraction : Extended;
    function Mantissa : QWord;
    function SpecialType : TFloatSpecial;
    Bytes[AIndex: Cardinal]: Byte;
    Words[AIndex: Cardinal]: Word;
    Sign : Boolean;
    Exp : QWord;
    Frac : QWord;
  end
  ;
Description
TSingleHelper is the helper type for the single-sized floating point type. It contains some conversion methods, as well as access to the low-level structure of the floating-point representation of a single.
Members
| Member | Type | Visibility | Description | 
|---|---|---|---|
| BuildUp | Method | public | Build a single-sized floating point from its composing parts | 
| Bytes | Property | public | Indexed access to the individual bytes of the floating point value | 
| Epsilon | Constant | public | Precision for this floating point type | 
| Exp | Property | public | The bit pattern of the exponent as stored in memory. | 
| Exponent | Method | public | Exponent of the floating-point value | 
| Frac | Property | public | Bitpattern that makes up the fractional part. | 
| Fraction | Method | public | Fraction of the floating-point value | 
| GetB | Method | private | |
| GetE | Method | private | |
| GetF | Method | private | |
| GetS | Method | private | |
| GetW | Method | private | |
| IsInfinity | Method | public | Check whether a value is positive or negative infinity. | 
| IsNan | Method | public | Check whether a value equals NaN. | 
| IsNegativeInfinity | Method | public | Check whether a value is negative infinity. | 
| IsPositiveInfinity | Method | public | Check whether a value is positive infinity. | 
| Mantissa | Method | public | Mantissa of the floating-point | 
| MaxValue | Constant | public | Largest possible value for the Single floating point type | 
| MinValue | Constant | public | Smallest (negative) possible value for the Single floating point type | 
| NaN | Constant | public | Representation of NaN (Not a Number) | 
| NegativeInfinity | Constant | public | Negative infinity as represented by a single floating point type | 
| Parse | Method | public | Convert a string to a floating point value | 
| PositiveInfinity | Constant | public | Positive infinity as represented by a single floating point type | 
| SetB | Method | private | |
| SetE | Method | private | |
| SetF | Method | private | |
| SetS | Method | private | |
| SetW | Method | private | |
| Sign | Property | public | Sign of the floating point value | 
| Size | Method | public | Size (in bytes) of a single-sized floating point value. | 
| SpecialType | Method | public | Return the type of the single-sized floating point value | 
| ToString | Method | public | Convert a single-sized floating point value to a string | 
| TryParse | Method | public | Try to convert a string to a single-sized floating point value. | 
| Words | Property | public | Indexed access to the words that make up the floating point value | 
Inheritance
| Class | Description | 
|---|---|
| TSingleHelper | Helper for Single floating point type | 
See also
| Name | Description | 
|---|---|
| Byte | An unsigned 8-bits integer | 
| QWord | 64-bit unsigned integer | 
| QWord | 64-bit unsigned integer | 
| TDoubleHelper | Helper for Double floating point type | 
| TExtendedHelper | Helper for Extended floating point type | 
| Word | An unsigned 16-bits integer |