pascalx.lang.math.vcoverage.pas

Переключить прокрутку окна
Загрузить этот исходный код

{
    pascalx.lang.math.vcoverage — классы-обёртки для скалярных и векторных
    типов данных.

    Copyright © 2026 Малик Разработчик

    Это свободная программа: вы можете перераспространять её и/или изменять
    её на условиях Меньшей Стандартной общественной лицензии GNU в том виде,
    в каком она была опубликована Фондом свободного программного обеспечения;
    либо версии 3 лицензии, либо (по вашему выбору) любой более поздней версии.

    Эта программа распространяется в надежде, что она будет полезной,
    но БЕЗО ВСЯКИХ ГАРАНТИЙ; даже без неявной гарантии ТОВАРНОГО ВИДА
    или ПРИГОДНОСТИ ДЛЯ ОПРЕДЕЛЁННЫХ ЦЕЛЕЙ. Подробнее см. в Меньшей Стандартной
    общественной лицензии GNU.

    Вы должны были получить копию Меньшей Стандартной общественной лицензии GNU
    вместе с этой программой. Если это не так, см.
    <https://www.gnu.org/licenses/>.
}

unit pascalx.lang.math.vcoverage;

    {$MODE OBJFPC}

interface

    {%region} uses
        pascalx.lang,
        pascalx.lang.math.avo;
    {%endregion}

    {$TYPEINFO ON}
    {$CALLING REGISTER}

    const UNIT_NAME = 'pascalx.lang.math.vcoverage';

    {%region} type
        Numeric       = interface;
        CustomNumeric = class;
        VCoByte       = class;
        VCoByte2      = class;
        VCoByte4      = class;
        VCoByte8      = class;
        VCoShort      = class;
        VCoShort2     = class;
        VCoShort4     = class;
        VCoShort8     = class;
        VCoInt        = class;
        VCoInt2       = class;
        VCoInt4       = class;
        VCoInt8       = class;
        VCoLong       = class;
        VCoLong2      = class;
        VCoLong4      = class;
        VCoLong8      = class;
        VCoFloat      = class;
        VCoFloat2     = class;
        VCoFloat4     = class;
        VCoFloat8     = class;
        VCoDouble     = class;
        VCoDouble2    = class;
        VCoDouble4    = class;
        VCoDouble8    = class;
        VCoReal       = class;

        Numeric = interface(RefCountInterface) ['{C4983073-14D5-43AC-BCF4-D919726FB13E}']
            function getKind(): int;
            function isNaN(): boolean;
            function isInfinite(): boolean;
            function asChar(): char;
            function asUChar(): uchar;
            function asByte(): byte;
            function asByte2(): byte2;
            function asByte4(): byte4;
            function asByte8(): byte8;
            function asShort(): short;
            function asShort2(): short2;
            function asShort4(): short4;
            function asShort8(): short8;
            function asInt(): int;
            function asInt2(): int2;
            function asInt4(): int4;
            function asInt8(): int8;
            function asLong(): long;
            function asLong2(): long2;
            function asLong4(): long4;
            function asLong8(): long8;
            function asFloat(): float;
            function asFloat2(): float2;
            function asFloat4(): float4;
            function asFloat8(): float8;
            function asDouble(): double;
            function asDouble2(): double2;
            function asDouble4(): double4;
            function asDouble8(): double8;
            function asReal(): real;
        end;

        CustomNumeric = class abstract(RefCountObject, Numeric)
        public const
            KIND_CHAR    = int(20);
            KIND_UCHAR   = int(21);
            KIND_BYTE    = int(24);
            KIND_BYTE2   = int(25);
            KIND_BYTE4   = int(26);
            KIND_BYTE8   = int(27);
            KIND_SHORT   = int(28);
            KIND_SHORT2  = int(29);
            KIND_SHORT4  = int(30);
            KIND_SHORT8  = int(31);
            KIND_INT     = int(32);
            KIND_INT2    = int(33);
            KIND_INT4    = int(34);
            KIND_INT8    = int(35);
            KIND_LONG    = int(36);
            KIND_LONG2   = int(37);
            KIND_LONG4   = int(38);
            KIND_LONG8   = int(39);
            KIND_FLOAT   = int(40);
            KIND_FLOAT2  = int(41);
            KIND_FLOAT4  = int(42);
            KIND_FLOAT8  = int(43);
            KIND_DOUBLE  = int(44);
            KIND_DOUBLE2 = int(45);
            KIND_DOUBLE4 = int(46);
            KIND_DOUBLE8 = int(47);
            KIND_REAL    = int(48);
        public
            function getKind(): int; virtual; abstract;
            function asByte8(): byte8; virtual; abstract;
            function asShort8(): short8; virtual; abstract;
            function asInt8(): int8; virtual; abstract;
            function asLong8(): long8; virtual; abstract;
            function asFloat8(): float8; virtual; abstract;
            function asDouble8(): double8; virtual; abstract;
            function asReal(): real; virtual; abstract;
            function isNaN(): boolean; virtual;
            function isInfinite(): boolean; virtual;
            function asChar(): char; virtual;
            function asUChar(): uchar; virtual;
            function asByte(): byte; virtual;
            function asByte2(): byte2; virtual;
            function asByte4(): byte4; virtual;
            function asShort(): short; virtual;
            function asShort2(): short2; virtual;
            function asShort4(): short4; virtual;
            function asInt(): int; virtual;
            function asInt2(): int2; virtual;
            function asInt4(): int4; virtual;
            function asLong(): long; virtual;
            function asLong2(): long2; virtual;
            function asLong4(): long4; virtual;
            function asFloat(): float; virtual;
            function asFloat2(): float2; virtual;
            function asFloat4(): float4; virtual;
            function asDouble(): double; virtual;
            function asDouble2(): double2; virtual;
            function asDouble4(): double4; virtual;
        end;

        VCoByte = class sealed(CustomNumeric)
        private
            fldValue: byte;
        public
            constructor create(const value: long);
            constructor create(const value: real);
            function equals(anot: TObject): boolean; override;
            function getHashCode(): long; override;
            function toString(): AnsiString; override;
            function getKind(): int; override;
            function asByte(): byte; override;
            function asByte2(): byte2; override;
            function asByte4(): byte4; override;
            function asByte8(): byte8; override;
            function asShort(): short; override;
            function asShort2(): short2; override;
            function asShort4(): short4; override;
            function asShort8(): short8; override;
            function asInt(): int; override;
            function asInt2(): int2; override;
            function asInt4(): int4; override;
            function asInt8(): int8; override;
            function asLong(): long; override;
            function asLong2(): long2; override;
            function asLong4(): long4; override;
            function asLong8(): long8; override;
            function asFloat(): float; override;
            function asFloat2(): float2; override;
            function asFloat4(): float4; override;
            function asFloat8(): float8; override;
            function asDouble(): double; override;
            function asDouble2(): double2; override;
            function asDouble4(): double4; override;
            function asDouble8(): double8; override;
            function asReal(): real; override;
        end;

        VCoByte2 = class sealed(CustomNumeric)
        private
            fldValue: byte2;
        public
            constructor create(const value: long2);
            constructor create(const value: double2);
            function equals(anot: TObject): boolean; override;
            function getHashCode(): long; override;
            function getKind(): int; override;
            function asByte2(): byte2; override;
            function asByte4(): byte4; override;
            function asByte8(): byte8; override;
            function asShort2(): short2; override;
            function asShort4(): short4; override;
            function asShort8(): short8; override;
            function asInt2(): int2; override;
            function asInt4(): int4; override;
            function asInt8(): int8; override;
            function asLong2(): long2; override;
            function asLong4(): long4; override;
            function asLong8(): long8; override;
            function asFloat2(): float2; override;
            function asFloat4(): float4; override;
            function asFloat8(): float8; override;
            function asDouble2(): double2; override;
            function asDouble4(): double4; override;
            function asDouble8(): double8; override;
            function asReal(): real; override;
        end;

        VCoByte4 = class sealed(CustomNumeric)
        private
            fldValue: byte4;
        public
            constructor create(const value: long4);
            constructor create(const value: double4);
            function equals(anot: TObject): boolean; override;
            function getHashCode(): long; override;
            function getKind(): int; override;
            function asByte4(): byte4; override;
            function asByte8(): byte8; override;
            function asShort4(): short4; override;
            function asShort8(): short8; override;
            function asInt4(): int4; override;
            function asInt8(): int8; override;
            function asLong4(): long4; override;
            function asLong8(): long8; override;
            function asFloat4(): float4; override;
            function asFloat8(): float8; override;
            function asDouble4(): double4; override;
            function asDouble8(): double8; override;
            function asReal(): real; override;
        end;

        VCoByte8 = class sealed(CustomNumeric)
        private
            fldValue: byte8;
        public
            constructor create(const value: long8);
            constructor create(const value: double8);
            function equals(anot: TObject): boolean; override;
            function getHashCode(): long; override;
            function getKind(): int; override;
            function asByte8(): byte8; override;
            function asShort8(): short8; override;
            function asInt8(): int8; override;
            function asLong8(): long8; override;
            function asFloat8(): float8; override;
            function asDouble8(): double8; override;
            function asReal(): real; override;
        end;

        VCoShort = class sealed(CustomNumeric)
        private
            fldValue: short;
        public
            constructor create(const value: long);
            constructor create(const value: real);
            function equals(anot: TObject): boolean; override;
            function getHashCode(): long; override;
            function toString(): AnsiString; override;
            function getKind(): int; override;
            function asByte(): byte; override;
            function asByte2(): byte2; override;
            function asByte4(): byte4; override;
            function asByte8(): byte8; override;
            function asShort(): short; override;
            function asShort2(): short2; override;
            function asShort4(): short4; override;
            function asShort8(): short8; override;
            function asInt(): int; override;
            function asInt2(): int2; override;
            function asInt4(): int4; override;
            function asInt8(): int8; override;
            function asLong(): long; override;
            function asLong2(): long2; override;
            function asLong4(): long4; override;
            function asLong8(): long8; override;
            function asFloat(): float; override;
            function asFloat2(): float2; override;
            function asFloat4(): float4; override;
            function asFloat8(): float8; override;
            function asDouble(): double; override;
            function asDouble2(): double2; override;
            function asDouble4(): double4; override;
            function asDouble8(): double8; override;
            function asReal(): real; override;
        end;

        VCoShort2 = class sealed(CustomNumeric)
        private
            fldValue: short2;
        public
            constructor create(const value: long2);
            constructor create(const value: double2);
            function equals(anot: TObject): boolean; override;
            function getHashCode(): long; override;
            function getKind(): int; override;
            function asByte2(): byte2; override;
            function asByte4(): byte4; override;
            function asByte8(): byte8; override;
            function asShort2(): short2; override;
            function asShort4(): short4; override;
            function asShort8(): short8; override;
            function asInt2(): int2; override;
            function asInt4(): int4; override;
            function asInt8(): int8; override;
            function asLong2(): long2; override;
            function asLong4(): long4; override;
            function asLong8(): long8; override;
            function asFloat2(): float2; override;
            function asFloat4(): float4; override;
            function asFloat8(): float8; override;
            function asDouble2(): double2; override;
            function asDouble4(): double4; override;
            function asDouble8(): double8; override;
            function asReal(): real; override;
        end;

        VCoShort4 = class sealed(CustomNumeric)
        private
            fldValue: short4;
        public
            constructor create(const value: long4);
            constructor create(const value: double4);
            function equals(anot: TObject): boolean; override;
            function getHashCode(): long; override;
            function getKind(): int; override;
            function asByte4(): byte4; override;
            function asByte8(): byte8; override;
            function asShort4(): short4; override;
            function asShort8(): short8; override;
            function asInt4(): int4; override;
            function asInt8(): int8; override;
            function asLong4(): long4; override;
            function asLong8(): long8; override;
            function asFloat4(): float4; override;
            function asFloat8(): float8; override;
            function asDouble4(): double4; override;
            function asDouble8(): double8; override;
            function asReal(): real; override;
        end;

        VCoShort8 = class sealed(CustomNumeric)
        private
            fldValue: short8;
        public
            constructor create(const value: long8);
            constructor create(const value: double8);
            function equals(anot: TObject): boolean; override;
            function getHashCode(): long; override;
            function getKind(): int; override;
            function asByte8(): byte8; override;
            function asShort8(): short8; override;
            function asInt8(): int8; override;
            function asLong8(): long8; override;
            function asFloat8(): float8; override;
            function asDouble8(): double8; override;
            function asReal(): real; override;
        end;

        VCoInt = class sealed(CustomNumeric)
        private
            fldValue: int;
        public
            constructor create(const value: long);
            constructor create(const value: real);
            function equals(anot: TObject): boolean; override;
            function getHashCode(): long; override;
            function toString(): AnsiString; override;
            function getKind(): int; override;
            function asByte(): byte; override;
            function asByte2(): byte2; override;
            function asByte4(): byte4; override;
            function asByte8(): byte8; override;
            function asShort(): short; override;
            function asShort2(): short2; override;
            function asShort4(): short4; override;
            function asShort8(): short8; override;
            function asInt(): int; override;
            function asInt2(): int2; override;
            function asInt4(): int4; override;
            function asInt8(): int8; override;
            function asLong(): long; override;
            function asLong2(): long2; override;
            function asLong4(): long4; override;
            function asLong8(): long8; override;
            function asFloat(): float; override;
            function asFloat2(): float2; override;
            function asFloat4(): float4; override;
            function asFloat8(): float8; override;
            function asDouble(): double; override;
            function asDouble2(): double2; override;
            function asDouble4(): double4; override;
            function asDouble8(): double8; override;
            function asReal(): real; override;
        end;

        VCoInt2 = class sealed(CustomNumeric)
        private const
            ZERO: int2 = ( 0, 0 );
        public
            class function toFloat2Bits(const value: int2): float2; static;
        private
            fldValue: int2;
        public
            constructor create(const value: long2);
            constructor create(const value: double2);
            function equals(anot: TObject): boolean; override;
            function getHashCode(): long; override;
            function getKind(): int; override;
            function asByte2(): byte2; override;
            function asByte4(): byte4; override;
            function asByte8(): byte8; override;
            function asShort2(): short2; override;
            function asShort4(): short4; override;
            function asShort8(): short8; override;
            function asInt2(): int2; override;
            function asInt4(): int4; override;
            function asInt8(): int8; override;
            function asLong2(): long2; override;
            function asLong4(): long4; override;
            function asLong8(): long8; override;
            function asFloat2(): float2; override;
            function asFloat4(): float4; override;
            function asFloat8(): float8; override;
            function asDouble2(): double2; override;
            function asDouble4(): double4; override;
            function asDouble8(): double8; override;
            function asReal(): real; override;
        end;

        VCoInt4 = class sealed(CustomNumeric)
        private const
            ZERO: int4 = ( 0, 0, 0, 0 );
        public
            class function toFloat4Bits(const value: int4): float4; static;
        private
            fldValue: int4;
        public
            constructor create(const value: long4);
            constructor create(const value: double4);
            function equals(anot: TObject): boolean; override;
            function getHashCode(): long; override;
            function getKind(): int; override;
            function asByte4(): byte4; override;
            function asByte8(): byte8; override;
            function asShort4(): short4; override;
            function asShort8(): short8; override;
            function asInt4(): int4; override;
            function asInt8(): int8; override;
            function asLong4(): long4; override;
            function asLong8(): long8; override;
            function asFloat4(): float4; override;
            function asFloat8(): float8; override;
            function asDouble4(): double4; override;
            function asDouble8(): double8; override;
            function asReal(): real; override;
        end;

        VCoInt8 = class sealed(CustomNumeric)
        private const
            ZERO: int8 = ( 0, 0, 0, 0, 0, 0, 0, 0 );
        public
            class function toFloat8Bits(const value: int8): float8; static;
        private
            fldValue: int8;
        public
            constructor create(const value: long8);
            constructor create(const value: double8);
            function equals(anot: TObject): boolean; override;
            function getHashCode(): long; override;
            function getKind(): int; override;
            function asByte8(): byte8; override;
            function asShort8(): short8; override;
            function asInt8(): int8; override;
            function asLong8(): long8; override;
            function asFloat8(): float8; override;
            function asDouble8(): double8; override;
            function asReal(): real; override;
        end;

        VCoLong = class sealed(CustomNumeric)
        private
            fldValue: long;
        public
            constructor create(const value: long);
            constructor create(const value: real);
            function equals(anot: TObject): boolean; override;
            function getHashCode(): long; override;
            function toString(): AnsiString; override;
            function getKind(): int; override;
            function asByte(): byte; override;
            function asByte2(): byte2; override;
            function asByte4(): byte4; override;
            function asByte8(): byte8; override;
            function asShort(): short; override;
            function asShort2(): short2; override;
            function asShort4(): short4; override;
            function asShort8(): short8; override;
            function asInt(): int; override;
            function asInt2(): int2; override;
            function asInt4(): int4; override;
            function asInt8(): int8; override;
            function asLong(): long; override;
            function asLong2(): long2; override;
            function asLong4(): long4; override;
            function asLong8(): long8; override;
            function asFloat(): float; override;
            function asFloat2(): float2; override;
            function asFloat4(): float4; override;
            function asFloat8(): float8; override;
            function asDouble(): double; override;
            function asDouble2(): double2; override;
            function asDouble4(): double4; override;
            function asDouble8(): double8; override;
            function asReal(): real; override;
        end;

        VCoLong2 = class sealed(CustomNumeric)
        private const
            ZERO: long2 = ( 0, 0 );
        public
            class function toDouble2Bits(const value: long2): double2; static;
            class function toRealBits(const value: long2): real; static;
        private
            fldValue: long2;
        public
            constructor create(const value: long2);
            constructor create(const value: double2);
            function equals(anot: TObject): boolean; override;
            function getHashCode(): long; override;
            function getKind(): int; override;
            function asByte2(): byte2; override;
            function asByte4(): byte4; override;
            function asByte8(): byte8; override;
            function asShort2(): short2; override;
            function asShort4(): short4; override;
            function asShort8(): short8; override;
            function asInt2(): int2; override;
            function asInt4(): int4; override;
            function asInt8(): int8; override;
            function asLong2(): long2; override;
            function asLong4(): long4; override;
            function asLong8(): long8; override;
            function asFloat2(): float2; override;
            function asFloat4(): float4; override;
            function asFloat8(): float8; override;
            function asDouble2(): double2; override;
            function asDouble4(): double4; override;
            function asDouble8(): double8; override;
            function asReal(): real; override;
        end;

        VCoLong4 = class sealed(CustomNumeric)
        private const
            ZERO: long4 = ( 0, 0, 0, 0 );
        public
            class function toDouble4Bits(const value: long4): double4; static;
        private
            fldValue: long4;
        public
            constructor create(const value: long4);
            constructor create(const value: double4);
            function equals(anot: TObject): boolean; override;
            function getHashCode(): long; override;
            function getKind(): int; override;
            function asByte4(): byte4; override;
            function asByte8(): byte8; override;
            function asShort4(): short4; override;
            function asShort8(): short8; override;
            function asInt4(): int4; override;
            function asInt8(): int8; override;
            function asLong4(): long4; override;
            function asLong8(): long8; override;
            function asFloat4(): float4; override;
            function asFloat8(): float8; override;
            function asDouble4(): double4; override;
            function asDouble8(): double8; override;
            function asReal(): real; override;
        end;

        VCoLong8 = class sealed(CustomNumeric)
        private const
            ZERO: long8 = ( 0, 0, 0, 0, 0, 0, 0, 0 );
        public
            class function toDouble8Bits(const value: long8): double8; static;
        private
            fldValue: long8;
        public
            constructor create(const value: long8);
            constructor create(const value: double8);
            function equals(anot: TObject): boolean; override;
            function getHashCode(): long; override;
            function getKind(): int; override;
            function asByte8(): byte8; override;
            function asShort8(): short8; override;
            function asInt8(): int8; override;
            function asLong8(): long8; override;
            function asFloat8(): float8; override;
            function asDouble8(): double8; override;
            function asReal(): real; override;
        end;

        VCoFloat = class sealed(CustomNumeric)
        private
            fldValue: float;
        public
            constructor create(const value: long);
            constructor create(const value: real);
            function equals(anot: TObject): boolean; override;
            function getHashCode(): long; override;
            function toString(): AnsiString; override;
            function getKind(): int; override;
            function isNaN(): boolean; override;
            function isInfinite(): boolean; override;
            function asByte(): byte; override;
            function asByte2(): byte2; override;
            function asByte4(): byte4; override;
            function asByte8(): byte8; override;
            function asShort(): short; override;
            function asShort2(): short2; override;
            function asShort4(): short4; override;
            function asShort8(): short8; override;
            function asInt(): int; override;
            function asInt2(): int2; override;
            function asInt4(): int4; override;
            function asInt8(): int8; override;
            function asLong(): long; override;
            function asLong2(): long2; override;
            function asLong4(): long4; override;
            function asLong8(): long8; override;
            function asFloat(): float; override;
            function asFloat2(): float2; override;
            function asFloat4(): float4; override;
            function asFloat8(): float8; override;
            function asDouble(): double; override;
            function asDouble2(): double2; override;
            function asDouble4(): double4; override;
            function asDouble8(): double8; override;
            function asReal(): real; override;
        end;

        VCoFloat2 = class sealed(CustomNumeric)
        private const
            POSITIVE_INFINITY: float2 = ( CoFloat.POSITIVE_INFINITY, CoFloat.POSITIVE_INFINITY );
            NEGATIVE_INFINITY: float2 = ( CoFloat.NEGATIVE_INFINITY, CoFloat.NEGATIVE_INFINITY );
        public
            class function isNaN(const value: float2): boolean; static;
            class function isInfinite(const value: float2): boolean; static;
            class function toInt2Bits(const value: float2): int2; static;
        private
            fldValue: float2;
        public
            constructor create(const value: long2);
            constructor create(const value: double2);
            function equals(anot: TObject): boolean; override;
            function getHashCode(): long; override;
            function getKind(): int; override;
            function isNaN(): boolean; override;
            function isInfinite(): boolean; override;
            function asByte2(): byte2; override;
            function asByte4(): byte4; override;
            function asByte8(): byte8; override;
            function asShort2(): short2; override;
            function asShort4(): short4; override;
            function asShort8(): short8; override;
            function asInt2(): int2; override;
            function asInt4(): int4; override;
            function asInt8(): int8; override;
            function asLong2(): long2; override;
            function asLong4(): long4; override;
            function asLong8(): long8; override;
            function asFloat2(): float2; override;
            function asFloat4(): float4; override;
            function asFloat8(): float8; override;
            function asDouble2(): double2; override;
            function asDouble4(): double4; override;
            function asDouble8(): double8; override;
            function asReal(): real; override;
        end;

        VCoFloat4 = class sealed(CustomNumeric)
        private const
            POSITIVE_INFINITY: float4 = ( CoFloat.POSITIVE_INFINITY, CoFloat.POSITIVE_INFINITY, CoFloat.POSITIVE_INFINITY, CoFloat.POSITIVE_INFINITY );
            NEGATIVE_INFINITY: float4 = ( CoFloat.NEGATIVE_INFINITY, CoFloat.NEGATIVE_INFINITY, CoFloat.NEGATIVE_INFINITY, CoFloat.NEGATIVE_INFINITY );
        public
            class function isNaN(const value: float4): boolean; static;
            class function isInfinite(const value: float4): boolean; static;
            class function toInt4Bits(const value: float4): int4; static;
        private
            fldValue: float4;
        public
            constructor create(const value: long4);
            constructor create(const value: double4);
            function equals(anot: TObject): boolean; override;
            function getHashCode(): long; override;
            function getKind(): int; override;
            function isNaN(): boolean; override;
            function isInfinite(): boolean; override;
            function asByte4(): byte4; override;
            function asByte8(): byte8; override;
            function asShort4(): short4; override;
            function asShort8(): short8; override;
            function asInt4(): int4; override;
            function asInt8(): int8; override;
            function asLong4(): long4; override;
            function asLong8(): long8; override;
            function asFloat4(): float4; override;
            function asFloat8(): float8; override;
            function asDouble4(): double4; override;
            function asDouble8(): double8; override;
            function asReal(): real; override;
        end;

        VCoFloat8 = class sealed(CustomNumeric)
        private const
            POSITIVE_INFINITY: float8 = (
                CoFloat.POSITIVE_INFINITY, CoFloat.POSITIVE_INFINITY, CoFloat.POSITIVE_INFINITY, CoFloat.POSITIVE_INFINITY,
                CoFloat.POSITIVE_INFINITY, CoFloat.POSITIVE_INFINITY, CoFloat.POSITIVE_INFINITY, CoFloat.POSITIVE_INFINITY
            );
            NEGATIVE_INFINITY: float8 = (
                CoFloat.NEGATIVE_INFINITY, CoFloat.NEGATIVE_INFINITY, CoFloat.NEGATIVE_INFINITY, CoFloat.NEGATIVE_INFINITY,
                CoFloat.NEGATIVE_INFINITY, CoFloat.NEGATIVE_INFINITY, CoFloat.NEGATIVE_INFINITY, CoFloat.NEGATIVE_INFINITY
            );
        public
            class function isNaN(const value: float8): boolean; static;
            class function isInfinite(const value: float8): boolean; static;
            class function toInt8Bits(const value: float8): int8; static;
        private
            fldValue: float8;
        public
            constructor create(const value: long8);
            constructor create(const value: double8);
            function equals(anot: TObject): boolean; override;
            function getHashCode(): long; override;
            function getKind(): int; override;
            function isNaN(): boolean; override;
            function isInfinite(): boolean; override;
            function asByte8(): byte8; override;
            function asShort8(): short8; override;
            function asInt8(): int8; override;
            function asLong8(): long8; override;
            function asFloat8(): float8; override;
            function asDouble8(): double8; override;
            function asReal(): real; override;
        end;

        VCoDouble = class sealed(CustomNumeric)
        private
            fldValue: double;
        public
            constructor create(const value: long);
            constructor create(const value: real);
            function equals(anot: TObject): boolean; override;
            function getHashCode(): long; override;
            function toString(): AnsiString; override;
            function getKind(): int; override;
            function isNaN(): boolean; override;
            function isInfinite(): boolean; override;
            function asByte(): byte; override;
            function asByte2(): byte2; override;
            function asByte4(): byte4; override;
            function asByte8(): byte8; override;
            function asShort(): short; override;
            function asShort2(): short2; override;
            function asShort4(): short4; override;
            function asShort8(): short8; override;
            function asInt(): int; override;
            function asInt2(): int2; override;
            function asInt4(): int4; override;
            function asInt8(): int8; override;
            function asLong(): long; override;
            function asLong2(): long2; override;
            function asLong4(): long4; override;
            function asLong8(): long8; override;
            function asFloat(): float; override;
            function asFloat2(): float2; override;
            function asFloat4(): float4; override;
            function asFloat8(): float8; override;
            function asDouble(): double; override;
            function asDouble2(): double2; override;
            function asDouble4(): double4; override;
            function asDouble8(): double8; override;
            function asReal(): real; override;
        end;

        VCoDouble2 = class sealed(CustomNumeric)
        private const
            POSITIVE_INFINITY: double2 = ( CoDouble.POSITIVE_INFINITY, CoDouble.POSITIVE_INFINITY );
            NEGATIVE_INFINITY: double2 = ( CoDouble.NEGATIVE_INFINITY, CoDouble.NEGATIVE_INFINITY );
        public
            class function isNaN(const value: double2): boolean; static;
            class function isInfinite(const value: double2): boolean; static;
            class function toLong2Bits(const value: double2): long2; static;
        private
            fldValue: double2;
        public
            constructor create(const value: long2);
            constructor create(const value: double2);
            function equals(anot: TObject): boolean; override;
            function getHashCode(): long; override;
            function getKind(): int; override;
            function isNaN(): boolean; override;
            function isInfinite(): boolean; override;
            function asByte2(): byte2; override;
            function asByte4(): byte4; override;
            function asByte8(): byte8; override;
            function asShort2(): short2; override;
            function asShort4(): short4; override;
            function asShort8(): short8; override;
            function asInt2(): int2; override;
            function asInt4(): int4; override;
            function asInt8(): int8; override;
            function asLong2(): long2; override;
            function asLong4(): long4; override;
            function asLong8(): long8; override;
            function asFloat2(): float2; override;
            function asFloat4(): float4; override;
            function asFloat8(): float8; override;
            function asDouble2(): double2; override;
            function asDouble4(): double4; override;
            function asDouble8(): double8; override;
            function asReal(): real; override;
        end;

        VCoDouble4 = class sealed(CustomNumeric)
        private const
            POSITIVE_INFINITY: double4 = ( CoDouble.POSITIVE_INFINITY, CoDouble.POSITIVE_INFINITY, CoDouble.POSITIVE_INFINITY, CoDouble.POSITIVE_INFINITY );
            NEGATIVE_INFINITY: double4 = ( CoDouble.NEGATIVE_INFINITY, CoDouble.NEGATIVE_INFINITY, CoDouble.NEGATIVE_INFINITY, CoDouble.NEGATIVE_INFINITY );
        public
            class function isNaN(const value: double4): boolean; static;
            class function isInfinite(const value: double4): boolean; static;
            class function toLong4Bits(const value: double4): long4; static;
        private
            fldValue: double4;
        public
            constructor create(const value: long4);
            constructor create(const value: double4);
            function equals(anot: TObject): boolean; override;
            function getHashCode(): long; override;
            function getKind(): int; override;
            function isNaN(): boolean; override;
            function isInfinite(): boolean; override;
            function asByte4(): byte4; override;
            function asByte8(): byte8; override;
            function asShort4(): short4; override;
            function asShort8(): short8; override;
            function asInt4(): int4; override;
            function asInt8(): int8; override;
            function asLong4(): long4; override;
            function asLong8(): long8; override;
            function asFloat4(): float4; override;
            function asFloat8(): float8; override;
            function asDouble4(): double4; override;
            function asDouble8(): double8; override;
            function asReal(): real; override;
        end;

        VCoDouble8 = class sealed(CustomNumeric)
        private const
            POSITIVE_INFINITY: double8 = (
                CoDouble.POSITIVE_INFINITY, CoDouble.POSITIVE_INFINITY, CoDouble.POSITIVE_INFINITY, CoDouble.POSITIVE_INFINITY,
                CoDouble.POSITIVE_INFINITY, CoDouble.POSITIVE_INFINITY, CoDouble.POSITIVE_INFINITY, CoDouble.POSITIVE_INFINITY
            );
            NEGATIVE_INFINITY: double8 = (
                CoDouble.NEGATIVE_INFINITY, CoDouble.NEGATIVE_INFINITY, CoDouble.NEGATIVE_INFINITY, CoDouble.NEGATIVE_INFINITY,
                CoDouble.NEGATIVE_INFINITY, CoDouble.NEGATIVE_INFINITY, CoDouble.NEGATIVE_INFINITY, CoDouble.NEGATIVE_INFINITY
            );
        public
            class function isNaN(const value: double8): boolean; static;
            class function isInfinite(const value: double8): boolean; static;
            class function toLong8Bits(const value: double8): long8; static;
        private
            fldValue: double8;
        public
            constructor create(const value: long8);
            constructor create(const value: double8);
            function equals(anot: TObject): boolean; override;
            function getHashCode(): long; override;
            function getKind(): int; override;
            function isNaN(): boolean; override;
            function isInfinite(): boolean; override;
            function asByte8(): byte8; override;
            function asShort8(): short8; override;
            function asInt8(): int8; override;
            function asLong8(): long8; override;
            function asFloat8(): float8; override;
            function asDouble8(): double8; override;
            function asReal(): real; override;
        end;

        VCoReal = class sealed(CustomNumeric)
        private const
            MASK: long2 = ( $ffffffffffffffff, $000000000000ffff );
        public
            class function toLong2Bits(const value: real): long2; static;
        private
            fldValue: real;
        public
            constructor create(const value: long);
            constructor create(const value: real);
            function equals(anot: TObject): boolean; override;
            function getHashCode(): long; override;
            function toString(): AnsiString; override;
            function getKind(): int; override;
            function isNaN(): boolean; override;
            function isInfinite(): boolean; override;
            function asByte(): byte; override;
            function asByte2(): byte2; override;
            function asByte4(): byte4; override;
            function asByte8(): byte8; override;
            function asShort(): short; override;
            function asShort2(): short2; override;
            function asShort4(): short4; override;
            function asShort8(): short8; override;
            function asInt(): int; override;
            function asInt2(): int2; override;
            function asInt4(): int4; override;
            function asInt8(): int8; override;
            function asLong(): long; override;
            function asLong2(): long2; override;
            function asLong4(): long4; override;
            function asLong8(): long8; override;
            function asFloat(): float; override;
            function asFloat2(): float2; override;
            function asFloat4(): float4; override;
            function asFloat8(): float8; override;
            function asDouble(): double; override;
            function asDouble2(): double2; override;
            function asDouble4(): double4; override;
            function asDouble8(): double8; override;
            function asReal(): real; override;
        end;
    {%endregion}

implementation

    {$TYPEINFO OFF}
    {$CALLING REGISTER}

    {%region} type
        RealStruct = packed record
            case int of
            0: (
                significand: long;
                exponent: short;
            );
            1: (
                bytes: packed array [0..9] of system.UInt8;
            );
            2: (
                words: packed array [0..4] of system.UInt16;
            );
            3: (
                value: real;
            );
        end;
    {%endregion}

    {%region  CustomNumeric }
        function CustomNumeric.isNaN(): boolean;
        begin
            result := false;
        end;

        function CustomNumeric.isInfinite(): boolean;
        begin
            result := false;
        end;

        function CustomNumeric.asChar(): char;
        begin
            result := char(asInt());
        end;

        function CustomNumeric.asUChar(): uchar;
        begin
            result := uchar(asInt());
        end;

        function CustomNumeric.asByte(): byte;
        begin
            result := asByte2()[0];
        end;

        function CustomNumeric.asByte2(): byte2;
        begin
            result := Cast.toByte2(asByte4());
        end;

        function CustomNumeric.asByte4(): byte4;
        begin
            result := Cast.toByte4(asByte8());
        end;

        function CustomNumeric.asShort(): short;
        begin
            result := asShort2()[0];
        end;

        function CustomNumeric.asShort2(): short2;
        begin
            result := Cast.toShort2(asShort4());
        end;

        function CustomNumeric.asShort4(): short4;
        begin
            result := Cast.toShort4(asShort8());
        end;

        function CustomNumeric.asInt(): int;
        begin
            result := asInt2()[0];
        end;

        function CustomNumeric.asInt2(): int2;
        begin
            result := Cast.toInt2(asInt4());
        end;

        function CustomNumeric.asInt4(): int4;
        begin
            result := Cast.toInt4(asInt8());
        end;

        function CustomNumeric.asLong(): long;
        begin
            result := asLong2()[0];
        end;

        function CustomNumeric.asLong2(): long2;
        begin
            result := Cast.toLong2(asLong4());
        end;

        function CustomNumeric.asLong4(): long4;
        begin
            result := Cast.toLong4(asLong8());
        end;

        function CustomNumeric.asFloat(): float;
        begin
            result := asFloat2()[0];
        end;

        function CustomNumeric.asFloat2(): float2;
        begin
            result := Cast.toFloat2(asFloat4());
        end;

        function CustomNumeric.asFloat4(): float4;
        begin
            result := Cast.toFloat4(asFloat8());
        end;

        function CustomNumeric.asDouble(): double;
        begin
            result := asDouble2()[0];
        end;

        function CustomNumeric.asDouble2(): double2;
        begin
            result := Cast.toDouble2(asDouble4());
        end;

        function CustomNumeric.asDouble4(): double4;
        begin
            result := Cast.toDouble4(asDouble8());
        end;
    {%endregion}

    {%region  VCoByte }
        constructor VCoByte.create(const value: long);
        begin
            inherited create();
            fldValue := byte(value);
        end;

        constructor VCoByte.create(const value: real);
        begin
            inherited create();
            fldValue := byte(CoReal.toInt(value));
        end;

        function VCoByte.equals(anot: TObject): boolean;
        begin
            result := (anot = self) or (anot is VCoByte) and (VCoByte(anot).fldValue = fldValue);
        end;

        function VCoByte.getHashCode(): long;
        begin
            result := fldValue;
        end;

        function VCoByte.toString(): AnsiString;
        begin
            result := CoInt.toString(fldValue);
        end;

        function VCoByte.getKind(): int;
        begin
            result := KIND_BYTE;
        end;

        function VCoByte.asByte(): byte;
        begin
            result := fldValue;
        end;

        function VCoByte.asByte2(): byte2;
        begin
            result := fldValue;
        end;

        function VCoByte.asByte4(): byte4;
        begin
            result := fldValue;
        end;

        function VCoByte.asByte8(): byte8;
        begin
            result := fldValue;
        end;

        function VCoByte.asShort(): short;
        begin
            result := fldValue;
        end;

        function VCoByte.asShort2(): short2;
        begin
            result := fldValue;
        end;

        function VCoByte.asShort4(): short4;
        begin
            result := fldValue;
        end;

        function VCoByte.asShort8(): short8;
        begin
            result := fldValue;
        end;

        function VCoByte.asInt(): int;
        begin
            result := fldValue;
        end;

        function VCoByte.asInt2(): int2;
        begin
            result := fldValue;
        end;

        function VCoByte.asInt4(): int4;
        begin
            result := fldValue;
        end;

        function VCoByte.asInt8(): int8;
        begin
            result := fldValue;
        end;

        function VCoByte.asLong(): long;
        begin
            result := fldValue;
        end;

        function VCoByte.asLong2(): long2;
        begin
            result := fldValue;
        end;

        function VCoByte.asLong4(): long4;
        begin
            result := fldValue;
        end;

        function VCoByte.asLong8(): long8;
        begin
            result := fldValue;
        end;

        function VCoByte.asFloat(): float;
        begin
            result := fldValue;
        end;

        function VCoByte.asFloat2(): float2;
        begin
            result := fldValue;
        end;

        function VCoByte.asFloat4(): float4;
        begin
            result := fldValue;
        end;

        function VCoByte.asFloat8(): float8;
        begin
            result := fldValue;
        end;

        function VCoByte.asDouble(): double;
        begin
            result := fldValue;
        end;

        function VCoByte.asDouble2(): double2;
        begin
            result := fldValue;
        end;

        function VCoByte.asDouble4(): double4;
        begin
            result := fldValue;
        end;

        function VCoByte.asDouble8(): double8;
        begin
            result := fldValue;
        end;

        function VCoByte.asReal(): real;
        begin
            result := fldValue;
        end;
    {%endregion}

    {%region  VCoByte2 }
        constructor VCoByte2.create(const value: long2);
        begin
            inherited create();
            fldValue := Cast.toByte2(value);
        end;

        constructor VCoByte2.create(const value: double2);
        begin
            inherited create();
            fldValue := Cast.toByte2(value);
        end;

        function VCoByte2.equals(anot: TObject): boolean;
        begin
            result := (anot = self) or (anot is VCoByte2) and (VCoByte2(anot).fldValue = fldValue);
        end;

        function VCoByte2.getHashCode(): long;
        begin
            result := short((@fldValue)^);
        end;

        function VCoByte2.getKind(): int;
        begin
            result := KIND_BYTE2;
        end;

        function VCoByte2.asByte2(): byte2;
        begin
            result := fldValue;
        end;

        function VCoByte2.asByte4(): byte4;
        begin
            result := fldValue;
        end;

        function VCoByte2.asByte8(): byte8;
        begin
            result := fldValue;
        end;

        function VCoByte2.asShort2(): short2;
        begin
            result := fldValue;
        end;

        function VCoByte2.asShort4(): short4;
        begin
            result := fldValue;
        end;

        function VCoByte2.asShort8(): short8;
        begin
            result := fldValue;
        end;

        function VCoByte2.asInt2(): int2;
        begin
            result := fldValue;
        end;

        function VCoByte2.asInt4(): int4;
        begin
            result := fldValue;
        end;

        function VCoByte2.asInt8(): int8;
        begin
            result := fldValue;
        end;

        function VCoByte2.asLong2(): long2;
        begin
            result := fldValue;
        end;

        function VCoByte2.asLong4(): long4;
        begin
            result := fldValue;
        end;

        function VCoByte2.asLong8(): long8;
        begin
            result := fldValue;
        end;

        function VCoByte2.asFloat2(): float2;
        begin
            result := fldValue;
        end;

        function VCoByte2.asFloat4(): float4;
        begin
            result := fldValue;
        end;

        function VCoByte2.asFloat8(): float8;
        begin
            result := fldValue;
        end;

        function VCoByte2.asDouble2(): double2;
        begin
            result := fldValue;
        end;

        function VCoByte2.asDouble4(): double4;
        begin
            result := fldValue;
        end;

        function VCoByte2.asDouble8(): double8;
        begin
            result := fldValue;
        end;

        function VCoByte2.asReal(): real;
        begin
            result := fldValue[0];
        end;
    {%endregion}

    {%region  VCoByte4 }
        constructor VCoByte4.create(const value: long4);
        begin
            inherited create();
            fldValue := Cast.toByte4(value);
        end;

        constructor VCoByte4.create(const value: double4);
        begin
            inherited create();
            fldValue := Cast.toByte4(value);
        end;

        function VCoByte4.equals(anot: TObject): boolean;
        begin
            result := (anot = self) or (anot is VCoByte4) and (VCoByte4(anot).fldValue = fldValue);
        end;

        function VCoByte4.getHashCode(): long;
        begin
            result := int((@fldValue)^);
        end;

        function VCoByte4.getKind(): int;
        begin
            result := KIND_BYTE4;
        end;

        function VCoByte4.asByte4(): byte4;
        begin
            result := fldValue;
        end;

        function VCoByte4.asByte8(): byte8;
        begin
            result := fldValue;
        end;

        function VCoByte4.asShort4(): short4;
        begin
            result := fldValue;
        end;

        function VCoByte4.asShort8(): short8;
        begin
            result := fldValue;
        end;

        function VCoByte4.asInt4(): int4;
        begin
            result := fldValue;
        end;

        function VCoByte4.asInt8(): int8;
        begin
            result := fldValue;
        end;

        function VCoByte4.asLong4(): long4;
        begin
            result := fldValue;
        end;

        function VCoByte4.asLong8(): long8;
        begin
            result := fldValue;
        end;

        function VCoByte4.asFloat4(): float4;
        begin
            result := fldValue;
        end;

        function VCoByte4.asFloat8(): float8;
        begin
            result := fldValue;
        end;

        function VCoByte4.asDouble4(): double4;
        begin
            result := fldValue;
        end;

        function VCoByte4.asDouble8(): double8;
        begin
            result := fldValue;
        end;

        function VCoByte4.asReal(): real;
        begin
            result := fldValue[0];
        end;
    {%endregion}

    {%region  VCoByte8 }
        constructor VCoByte8.create(const value: long8);
        begin
            inherited create();
            fldValue := Cast.toByte8(value);
        end;

        constructor VCoByte8.create(const value: double8);
        begin
            inherited create();
            fldValue := Cast.toByte8(value);
        end;

        function VCoByte8.equals(anot: TObject): boolean;
        begin
            result := (anot = self) or (anot is VCoByte8) and (VCoByte8(anot).fldValue = fldValue);
        end;

        function VCoByte8.getHashCode(): long;
        begin
            result := long((@fldValue)^);
        end;

        function VCoByte8.getKind(): int;
        begin
            result := KIND_BYTE8;
        end;

        function VCoByte8.asByte8(): byte8;
        begin
            result := fldValue;
        end;

        function VCoByte8.asShort8(): short8;
        begin
            result := fldValue;
        end;

        function VCoByte8.asInt8(): int8;
        begin
            result := fldValue;
        end;

        function VCoByte8.asLong8(): long8;
        begin
            result := fldValue;
        end;

        function VCoByte8.asFloat8(): float8;
        begin
            result := fldValue;
        end;

        function VCoByte8.asDouble8(): double8;
        begin
            result := fldValue;
        end;

        function VCoByte8.asReal(): real;
        begin
            result := fldValue[0];
        end;
    {%endregion}

    {%region  VCoShort }
        constructor VCoShort.create(const value: long);
        begin
            inherited create();
            fldValue := short(value);
        end;

        constructor VCoShort.create(const value: real);
        begin
            inherited create();
            fldValue := short(CoReal.toInt(value));
        end;

        function VCoShort.equals(anot: TObject): boolean;
        begin
            result := (anot = self) or (anot is VCoShort) and (VCoShort(anot).fldValue = fldValue);
        end;

        function VCoShort.getHashCode(): long;
        begin
            result := fldValue;
        end;

        function VCoShort.toString(): AnsiString;
        begin
            result := CoInt.toString(fldValue);
        end;

        function VCoShort.getKind(): int;
        begin
            result := KIND_SHORT;
        end;

        function VCoShort.asByte(): byte;
        begin
            result := byte(fldValue);
        end;

        function VCoShort.asByte2(): byte2;
        begin
            result := byte(fldValue);
        end;

        function VCoShort.asByte4(): byte4;
        begin
            result := byte(fldValue);
        end;

        function VCoShort.asByte8(): byte8;
        begin
            result := byte(fldValue);
        end;

        function VCoShort.asShort(): short;
        begin
            result := fldValue;
        end;

        function VCoShort.asShort2(): short2;
        begin
            result := fldValue;
        end;

        function VCoShort.asShort4(): short4;
        begin
            result := fldValue;
        end;

        function VCoShort.asShort8(): short8;
        begin
            result := fldValue;
        end;

        function VCoShort.asInt(): int;
        begin
            result := fldValue;
        end;

        function VCoShort.asInt2(): int2;
        begin
            result := fldValue;
        end;

        function VCoShort.asInt4(): int4;
        begin
            result := fldValue;
        end;

        function VCoShort.asInt8(): int8;
        begin
            result := fldValue;
        end;

        function VCoShort.asLong(): long;
        begin
            result := fldValue;
        end;

        function VCoShort.asLong2(): long2;
        begin
            result := fldValue;
        end;

        function VCoShort.asLong4(): long4;
        begin
            result := fldValue;
        end;

        function VCoShort.asLong8(): long8;
        begin
            result := fldValue;
        end;

        function VCoShort.asFloat(): float;
        begin
            result := fldValue;
        end;

        function VCoShort.asFloat2(): float2;
        begin
            result := fldValue;
        end;

        function VCoShort.asFloat4(): float4;
        begin
            result := fldValue;
        end;

        function VCoShort.asFloat8(): float8;
        begin
            result := fldValue;
        end;

        function VCoShort.asDouble(): double;
        begin
            result := fldValue;
        end;

        function VCoShort.asDouble2(): double2;
        begin
            result := fldValue;
        end;

        function VCoShort.asDouble4(): double4;
        begin
            result := fldValue;
        end;

        function VCoShort.asDouble8(): double8;
        begin
            result := fldValue;
        end;

        function VCoShort.asReal(): real;
        begin
            result := fldValue;
        end;
    {%endregion}

    {%region  VCoShort2 }
        constructor VCoShort2.create(const value: long2);
        begin
            inherited create();
            fldValue := Cast.toShort2(value);
        end;

        constructor VCoShort2.create(const value: double2);
        begin
            inherited create();
            fldValue := Cast.toShort2(value);
        end;

        function VCoShort2.equals(anot: TObject): boolean;
        begin
            result := (anot = self) or (anot is VCoShort2) and (VCoShort2(anot).fldValue = fldValue);
        end;

        function VCoShort2.getHashCode(): long;
        begin
            result := int((@fldValue)^);
        end;

        function VCoShort2.getKind(): int;
        begin
            result := KIND_SHORT2;
        end;

        function VCoShort2.asByte2(): byte2;
        begin
            result := Cast.toByte2(fldValue);
        end;

        function VCoShort2.asByte4(): byte4;
        begin
            result := Cast.toByte2(fldValue);
        end;

        function VCoShort2.asByte8(): byte8;
        begin
            result := Cast.toByte2(fldValue);
        end;

        function VCoShort2.asShort2(): short2;
        begin
            result := fldValue;
        end;

        function VCoShort2.asShort4(): short4;
        begin
            result := fldValue;
        end;

        function VCoShort2.asShort8(): short8;
        begin
            result := fldValue;
        end;

        function VCoShort2.asInt2(): int2;
        begin
            result := fldValue;
        end;

        function VCoShort2.asInt4(): int4;
        begin
            result := fldValue;
        end;

        function VCoShort2.asInt8(): int8;
        begin
            result := fldValue;
        end;

        function VCoShort2.asLong2(): long2;
        begin
            result := fldValue;
        end;

        function VCoShort2.asLong4(): long4;
        begin
            result := fldValue;
        end;

        function VCoShort2.asLong8(): long8;
        begin
            result := fldValue;
        end;

        function VCoShort2.asFloat2(): float2;
        begin
            result := fldValue;
        end;

        function VCoShort2.asFloat4(): float4;
        begin
            result := fldValue;
        end;

        function VCoShort2.asFloat8(): float8;
        begin
            result := fldValue;
        end;

        function VCoShort2.asDouble2(): double2;
        begin
            result := fldValue;
        end;

        function VCoShort2.asDouble4(): double4;
        begin
            result := fldValue;
        end;

        function VCoShort2.asDouble8(): double8;
        begin
            result := fldValue;
        end;

        function VCoShort2.asReal(): real;
        begin
            result := fldValue[0];
        end;
    {%endregion}

    {%region  VCoShort4 }
        constructor VCoShort4.create(const value: long4);
        begin
            inherited create();
            fldValue := Cast.toShort4(value);
        end;

        constructor VCoShort4.create(const value: double4);
        begin
            inherited create();
            fldValue := Cast.toShort4(value);
        end;

        function VCoShort4.equals(anot: TObject): boolean;
        begin
            result := (anot = self) or (anot is VCoShort4) and (VCoShort4(anot).fldValue = fldValue);
        end;

        function VCoShort4.getHashCode(): long;
        begin
            result := long((@fldValue)^);
        end;

        function VCoShort4.getKind(): int;
        begin
            result := KIND_SHORT4;
        end;

        function VCoShort4.asByte4(): byte4;
        begin
            result := Cast.toByte4(fldValue);
        end;

        function VCoShort4.asByte8(): byte8;
        begin
            result := Cast.toByte4(fldValue);
        end;

        function VCoShort4.asShort4(): short4;
        begin
            result := fldValue;
        end;

        function VCoShort4.asShort8(): short8;
        begin
            result := fldValue;
        end;

        function VCoShort4.asInt4(): int4;
        begin
            result := fldValue;
        end;

        function VCoShort4.asInt8(): int8;
        begin
            result := fldValue;
        end;

        function VCoShort4.asLong4(): long4;
        begin
            result := fldValue;
        end;

        function VCoShort4.asLong8(): long8;
        begin
            result := fldValue;
        end;

        function VCoShort4.asFloat4(): float4;
        begin
            result := fldValue;
        end;

        function VCoShort4.asFloat8(): float8;
        begin
            result := fldValue;
        end;

        function VCoShort4.asDouble4(): double4;
        begin
            result := fldValue;
        end;

        function VCoShort4.asDouble8(): double8;
        begin
            result := fldValue;
        end;

        function VCoShort4.asReal(): real;
        begin
            result := fldValue[0];
        end;
    {%endregion}

    {%region  VCoShort8 }
        constructor VCoShort8.create(const value: long8);
        begin
            inherited create();
            fldValue := Cast.toShort8(value);
        end;

        constructor VCoShort8.create(const value: double8);
        begin
            inherited create();
            fldValue := Cast.toShort8(value);
        end;

        function VCoShort8.equals(anot: TObject): boolean;
        begin
            result := (anot = self) or (anot is VCoShort8) and (VCoShort8(anot).fldValue = fldValue);
        end;

        function VCoShort8.getHashCode(): long;
        begin
            result := long((@(fldValue[0]))^) xor long((@(fldValue[4]))^);
        end;

        function VCoShort8.getKind(): int;
        begin
            result := KIND_SHORT8;
        end;

        function VCoShort8.asByte8(): byte8;
        begin
            result := Cast.toByte8(fldValue);
        end;

        function VCoShort8.asShort8(): short8;
        begin
            result := fldValue;
        end;

        function VCoShort8.asInt8(): int8;
        begin
            result := fldValue;
        end;

        function VCoShort8.asLong8(): long8;
        begin
            result := fldValue;
        end;

        function VCoShort8.asFloat8(): float8;
        begin
            result := fldValue;
        end;

        function VCoShort8.asDouble8(): double8;
        begin
            result := fldValue;
        end;

        function VCoShort8.asReal(): real;
        begin
            result := fldValue[0];
        end;
    {%endregion}

    {%region  VCoInt }
        constructor VCoInt.create(const value: long);
        begin
            inherited create();
            fldValue := int(value);
        end;

        constructor VCoInt.create(const value: real);
        begin
            inherited create();
            fldValue := CoReal.toInt(value);
        end;

        function VCoInt.equals(anot: TObject): boolean;
        begin
            result := (anot = self) or (anot is VCoInt) and (VCoInt(anot).fldValue = fldValue);
        end;

        function VCoInt.getHashCode(): long;
        begin
            result := fldValue;
        end;

        function VCoInt.toString(): AnsiString;
        begin
            result := CoInt.toString(fldValue);
        end;

        function VCoInt.getKind(): int;
        begin
            result := KIND_INT;
        end;

        function VCoInt.asByte(): byte;
        begin
            result := byte(fldValue);
        end;

        function VCoInt.asByte2(): byte2;
        begin
            result := byte(fldValue);
        end;

        function VCoInt.asByte4(): byte4;
        begin
            result := byte(fldValue);
        end;

        function VCoInt.asByte8(): byte8;
        begin
            result := byte(fldValue);
        end;

        function VCoInt.asShort(): short;
        begin
            result := short(fldValue);
        end;

        function VCoInt.asShort2(): short2;
        begin
            result := short(fldValue);
        end;

        function VCoInt.asShort4(): short4;
        begin
            result := short(fldValue);
        end;

        function VCoInt.asShort8(): short8;
        begin
            result := short(fldValue);
        end;

        function VCoInt.asInt(): int;
        begin
            result := fldValue;
        end;

        function VCoInt.asInt2(): int2;
        begin
            result := fldValue;
        end;

        function VCoInt.asInt4(): int4;
        begin
            result := fldValue;
        end;

        function VCoInt.asInt8(): int8;
        begin
            result := fldValue;
        end;

        function VCoInt.asLong(): long;
        begin
            result := fldValue;
        end;

        function VCoInt.asLong2(): long2;
        begin
            result := fldValue;
        end;

        function VCoInt.asLong4(): long4;
        begin
            result := fldValue;
        end;

        function VCoInt.asLong8(): long8;
        begin
            result := fldValue;
        end;

        function VCoInt.asFloat(): float;
        begin
            result := CoInt.toFloat(fldValue);
        end;

        function VCoInt.asFloat2(): float2;
        begin
            result := CoInt.toFloat(fldValue);
        end;

        function VCoInt.asFloat4(): float4;
        begin
            result := CoInt.toFloat(fldValue);
        end;

        function VCoInt.asFloat8(): float8;
        begin
            result := CoInt.toFloat(fldValue);
        end;

        function VCoInt.asDouble(): double;
        begin
            result := fldValue;
        end;

        function VCoInt.asDouble2(): double2;
        begin
            result := fldValue;
        end;

        function VCoInt.asDouble4(): double4;
        begin
            result := fldValue;
        end;

        function VCoInt.asDouble8(): double8;
        begin
            result := fldValue;
        end;

        function VCoInt.asReal(): real;
        begin
            result := fldValue;
        end;
    {%endregion}

    {%region  VCoInt2 }
        class function VCoInt2.toFloat2Bits(const value: int2): float2;
        begin
            result := float2((@value)^);
        end;

        constructor VCoInt2.create(const value: long2);
        begin
            inherited create();
            fldValue := Cast.toInt2(value);
        end;

        constructor VCoInt2.create(const value: double2);
        begin
            inherited create();
            fldValue := Cast.toInt2(value);
        end;

        function VCoInt2.equals(anot: TObject): boolean;
        begin
            result := (anot = self) or (anot is VCoInt2) and (VCoInt2(anot).fldValue = fldValue);
        end;

        function VCoInt2.getHashCode(): long;
        begin
            result := long((@fldValue)^);
        end;

        function VCoInt2.getKind(): int;
        begin
            result := KIND_INT2;
        end;

        function VCoInt2.asByte2(): byte2;
        begin
            result := Cast.toByte2(fldValue);
        end;

        function VCoInt2.asByte4(): byte4;
        begin
            result := Cast.toByte2(fldValue);
        end;

        function VCoInt2.asByte8(): byte8;
        begin
            result := Cast.toByte2(fldValue);
        end;

        function VCoInt2.asShort2(): short2;
        begin
            result := Cast.toShort2(fldValue);
        end;

        function VCoInt2.asShort4(): short4;
        begin
            result := Cast.toShort2(fldValue);
        end;

        function VCoInt2.asShort8(): short8;
        begin
            result := Cast.toShort2(fldValue);
        end;

        function VCoInt2.asInt2(): int2;
        begin
            result := fldValue;
        end;

        function VCoInt2.asInt4(): int4;
        begin
            result := fldValue;
        end;

        function VCoInt2.asInt8(): int8;
        begin
            result := fldValue;
        end;

        function VCoInt2.asLong2(): long2;
        begin
            result := fldValue;
        end;

        function VCoInt2.asLong4(): long4;
        begin
            result := fldValue;
        end;

        function VCoInt2.asLong8(): long8;
        begin
            result := fldValue;
        end;

        function VCoInt2.asFloat2(): float2;
        begin
            result := Cast.toFloat2(fldValue);
        end;

        function VCoInt2.asFloat4(): float4;
        begin
            result := Cast.toFloat2(fldValue);
        end;

        function VCoInt2.asFloat8(): float8;
        begin
            result := Cast.toFloat2(fldValue);
        end;

        function VCoInt2.asDouble2(): double2;
        begin
            result := fldValue;
        end;

        function VCoInt2.asDouble4(): double4;
        begin
            result := fldValue;
        end;

        function VCoInt2.asDouble8(): double8;
        begin
            result := fldValue;
        end;

        function VCoInt2.asReal(): real;
        begin
            result := fldValue[0];
        end;
    {%endregion}

    {%region  VCoInt4 }
        class function VCoInt4.toFloat4Bits(const value: int4): float4;
        begin
            result := float4((@value)^);
        end;

        constructor VCoInt4.create(const value: long4);
        begin
            inherited create();
            fldValue := Cast.toInt4(value);
        end;

        constructor VCoInt4.create(const value: double4);
        begin
            inherited create();
            fldValue := Cast.toInt4(value);
        end;

        function VCoInt4.equals(anot: TObject): boolean;
        begin
            result := (anot = self) or (anot is VCoInt4) and (VCoInt4(anot).fldValue = fldValue);
        end;

        function VCoInt4.getHashCode(): long;
        begin
            result := long((@(fldValue[0]))^) xor long((@(fldValue[2]))^);
        end;

        function VCoInt4.getKind(): int;
        begin
            result := KIND_INT4;
        end;

        function VCoInt4.asByte4(): byte4;
        begin
            result := Cast.toByte4(fldValue);
        end;

        function VCoInt4.asByte8(): byte8;
        begin
            result := Cast.toByte4(fldValue);
        end;

        function VCoInt4.asShort4(): short4;
        begin
            result := Cast.toShort4(fldValue);
        end;

        function VCoInt4.asShort8(): short8;
        begin
            result := Cast.toShort4(fldValue);
        end;

        function VCoInt4.asInt4(): int4;
        begin
            result := fldValue;
        end;

        function VCoInt4.asInt8(): int8;
        begin
            result := fldValue;
        end;

        function VCoInt4.asLong4(): long4;
        begin
            result := fldValue;
        end;

        function VCoInt4.asLong8(): long8;
        begin
            result := fldValue;
        end;

        function VCoInt4.asFloat4(): float4;
        begin
            result := Cast.toFloat4(fldValue);
        end;

        function VCoInt4.asFloat8(): float8;
        begin
            result := Cast.toFloat4(fldValue);
        end;

        function VCoInt4.asDouble4(): double4;
        begin
            result := fldValue;
        end;

        function VCoInt4.asDouble8(): double8;
        begin
            result := fldValue;
        end;

        function VCoInt4.asReal(): real;
        begin
            result := fldValue[0];
        end;
    {%endregion}

    {%region  VCoInt8 }
        class function VCoInt8.toFloat8Bits(const value: int8): float8;
        begin
            result := float8((@value)^);
        end;

        constructor VCoInt8.create(const value: long8);
        begin
            inherited create();
            fldValue := Cast.toInt8(value);
        end;

        constructor VCoInt8.create(const value: double8);
        begin
            inherited create();
            fldValue := Cast.toInt8(value);
        end;

        function VCoInt8.equals(anot: TObject): boolean;
        begin
            result := (anot = self) or (anot is VCoInt8) and (VCoInt8(anot).fldValue = fldValue);
        end;

        function VCoInt8.getHashCode(): long;
        begin
            result := long((@(fldValue[0]))^) xor long((@(fldValue[2]))^) xor long((@(fldValue[4]))^) xor long((@(fldValue[6]))^);
        end;

        function VCoInt8.getKind(): int;
        begin
            result := KIND_INT8;
        end;

        function VCoInt8.asByte8(): byte8;
        begin
            result := Cast.toByte8(fldValue);
        end;

        function VCoInt8.asShort8(): short8;
        begin
            result := Cast.toShort8(fldValue);
        end;

        function VCoInt8.asInt8(): int8;
        begin
            result := fldValue;
        end;

        function VCoInt8.asLong8(): long8;
        begin
            result := fldValue;
        end;

        function VCoInt8.asFloat8(): float8;
        begin
            result := Cast.toFloat8(fldValue);
        end;

        function VCoInt8.asDouble8(): double8;
        begin
            result := fldValue;
        end;

        function VCoInt8.asReal(): real;
        begin
            result := fldValue[0];
        end;
    {%endregion}

    {%region  VCoLong }
        constructor VCoLong.create(const value: long);
        begin
            inherited create();
            fldValue := value;
        end;

        constructor VCoLong.create(const value: real);
        begin
            inherited create();
            fldValue := CoReal.toLong(value);
        end;

        function VCoLong.equals(anot: TObject): boolean;
        begin
            result := (anot = self) or (anot is VCoLong) and (VCoLong(anot).fldValue = fldValue);
        end;

        function VCoLong.getHashCode(): long;
        begin
            result := fldValue;
        end;

        function VCoLong.toString(): AnsiString;
        begin
            result := CoLong.toString(fldValue);
        end;

        function VCoLong.getKind(): int;
        begin
            result := KIND_LONG;
        end;

        function VCoLong.asByte(): byte;
        begin
            result := byte(fldValue);
        end;

        function VCoLong.asByte2(): byte2;
        begin
            result := byte(fldValue);
        end;

        function VCoLong.asByte4(): byte4;
        begin
            result := byte(fldValue);
        end;

        function VCoLong.asByte8(): byte8;
        begin
            result := byte(fldValue);
        end;

        function VCoLong.asShort(): short;
        begin
            result := short(fldValue);
        end;

        function VCoLong.asShort2(): short2;
        begin
            result := short(fldValue);
        end;

        function VCoLong.asShort4(): short4;
        begin
            result := short(fldValue);
        end;

        function VCoLong.asShort8(): short8;
        begin
            result := short(fldValue);
        end;

        function VCoLong.asInt(): int;
        begin
            result := int(fldValue);
        end;

        function VCoLong.asInt2(): int2;
        begin
            result := int(fldValue);
        end;

        function VCoLong.asInt4(): int4;
        begin
            result := int(fldValue);
        end;

        function VCoLong.asInt8(): int8;
        begin
            result := int(fldValue);
        end;

        function VCoLong.asLong(): long;
        begin
            result := fldValue;
        end;

        function VCoLong.asLong2(): long2;
        begin
            result := fldValue;
        end;

        function VCoLong.asLong4(): long4;
        begin
            result := fldValue;
        end;

        function VCoLong.asLong8(): long8;
        begin
            result := fldValue;
        end;

        function VCoLong.asFloat(): float;
        begin
            result := CoLong.toFloat(fldValue);
        end;

        function VCoLong.asFloat2(): float2;
        begin
            result := CoLong.toFloat(fldValue);
        end;

        function VCoLong.asFloat4(): float4;
        begin
            result := CoLong.toFloat(fldValue);
        end;

        function VCoLong.asFloat8(): float8;
        begin
            result := CoLong.toFloat(fldValue);
        end;

        function VCoLong.asDouble(): double;
        begin
            result := CoLong.toDouble(fldValue);
        end;

        function VCoLong.asDouble2(): double2;
        begin
            result := CoLong.toDouble(fldValue);
        end;

        function VCoLong.asDouble4(): double4;
        begin
            result := CoLong.toDouble(fldValue);
        end;

        function VCoLong.asDouble8(): double8;
        begin
            result := CoLong.toDouble(fldValue);
        end;

        function VCoLong.asReal(): real;
        begin
            result := fldValue;
        end;
    {%endregion}

    {%region  VCoLong2 }
        class function VCoLong2.toDouble2Bits(const value: long2): double2;
        begin
            result := double2((@value)^);
        end;

        class function VCoLong2.toRealBits(const value: long2): real;
        var
            struct: RealStruct absolute result;
        begin
            struct.significand := value[0];
            struct.exponent := short(value[1]);
        end;

        constructor VCoLong2.create(const value: long2);
        begin
            inherited create();
            fldValue := value;
        end;

        constructor VCoLong2.create(const value: double2);
        begin
            inherited create();
            fldValue := Cast.toLong2(value);
        end;

        function VCoLong2.equals(anot: TObject): boolean;
        begin
            result := (anot = self) or (anot is VCoLong2) and (VCoLong2(anot).fldValue = fldValue);
        end;

        function VCoLong2.getHashCode(): long;
        begin
            result := fldValue[0] xor fldValue[1];
        end;

        function VCoLong2.getKind(): int;
        begin
            result := KIND_LONG2;
        end;

        function VCoLong2.asByte2(): byte2;
        begin
            result := Cast.toByte2(fldValue);
        end;

        function VCoLong2.asByte4(): byte4;
        begin
            result := Cast.toByte2(fldValue);
        end;

        function VCoLong2.asByte8(): byte8;
        begin
            result := Cast.toByte2(fldValue);
        end;

        function VCoLong2.asShort2(): short2;
        begin
            result := Cast.toShort2(fldValue);
        end;

        function VCoLong2.asShort4(): short4;
        begin
            result := Cast.toShort2(fldValue);
        end;

        function VCoLong2.asShort8(): short8;
        begin
            result := Cast.toShort2(fldValue);
        end;

        function VCoLong2.asInt2(): int2;
        begin
            result := Cast.toInt2(fldValue);
        end;

        function VCoLong2.asInt4(): int4;
        begin
            result := Cast.toInt2(fldValue);
        end;

        function VCoLong2.asInt8(): int8;
        begin
            result := Cast.toInt2(fldValue);
        end;

        function VCoLong2.asLong2(): long2;
        begin
            result := fldValue;
        end;

        function VCoLong2.asLong4(): long4;
        begin
            result := fldValue;
        end;

        function VCoLong2.asLong8(): long8;
        begin
            result := fldValue;
        end;

        function VCoLong2.asFloat2(): float2;
        begin
            result := Cast.toFloat2(fldValue);
        end;

        function VCoLong2.asFloat4(): float4;
        begin
            result := Cast.toFloat2(fldValue);
        end;

        function VCoLong2.asFloat8(): float8;
        begin
            result := Cast.toFloat2(fldValue);
        end;

        function VCoLong2.asDouble2(): double2;
        begin
            result := Cast.toDouble2(fldValue);
        end;

        function VCoLong2.asDouble4(): double4;
        begin
            result := Cast.toDouble2(fldValue);
        end;

        function VCoLong2.asDouble8(): double8;
        begin
            result := Cast.toDouble2(fldValue);
        end;

        function VCoLong2.asReal(): real;
        begin
            result := fldValue[0];
        end;
    {%endregion}

    {%region  VCoLong4 }
        class function VCoLong4.toDouble4Bits(const value: long4): double4;
        begin
            result := double4((@value)^);
        end;

        constructor VCoLong4.create(const value: long4);
        begin
            inherited create();
            fldValue := value;
        end;

        constructor VCoLong4.create(const value: double4);
        begin
            inherited create();
            fldValue := Cast.toLong4(value);
        end;

        function VCoLong4.equals(anot: TObject): boolean;
        begin
            result := (anot = self) or (anot is VCoLong4) and (VCoLong4(anot).fldValue = fldValue);
        end;

        function VCoLong4.getHashCode(): long;
        begin
            result := fldValue[0] xor fldValue[1] xor fldValue[2] xor fldValue[3];
        end;

        function VCoLong4.getKind(): int;
        begin
            result := KIND_LONG4;
        end;

        function VCoLong4.asByte4(): byte4;
        begin
            result := Cast.toByte4(fldValue);
        end;

        function VCoLong4.asByte8(): byte8;
        begin
            result := Cast.toByte4(fldValue);
        end;

        function VCoLong4.asShort4(): short4;
        begin
            result := Cast.toShort4(fldValue);
        end;

        function VCoLong4.asShort8(): short8;
        begin
            result := Cast.toShort4(fldValue);
        end;

        function VCoLong4.asInt4(): int4;
        begin
            result := Cast.toInt4(fldValue);
        end;

        function VCoLong4.asInt8(): int8;
        begin
            result := Cast.toInt4(fldValue);
        end;

        function VCoLong4.asLong4(): long4;
        begin
            result := fldValue;
        end;

        function VCoLong4.asLong8(): long8;
        begin
            result := fldValue;
        end;

        function VCoLong4.asFloat4(): float4;
        begin
            result := Cast.toFloat4(fldValue);
        end;

        function VCoLong4.asFloat8(): float8;
        begin
            result := Cast.toFloat4(fldValue);
        end;

        function VCoLong4.asDouble4(): double4;
        begin
            result := Cast.toDouble4(fldValue);
        end;

        function VCoLong4.asDouble8(): double8;
        begin
            result := Cast.toDouble4(fldValue);
        end;

        function VCoLong4.asReal(): real;
        begin
            result := fldValue[0];
        end;
    {%endregion}

    {%region  VCoLong8 }
        class function VCoLong8.toDouble8Bits(const value: long8): double8;
        begin
            result := double8((@value)^);
        end;

        constructor VCoLong8.create(const value: long8);
        begin
            inherited create();
            fldValue := value;
        end;

        constructor VCoLong8.create(const value: double8);
        begin
            inherited create();
            fldValue := Cast.toLong8(value);
        end;

        function VCoLong8.equals(anot: TObject): boolean;
        begin
            result := (anot = self) or (anot is VCoLong8) and (VCoLong8(anot).fldValue = fldValue);
        end;

        function VCoLong8.getHashCode(): long;
        begin
            result := fldValue[0] xor fldValue[1] xor fldValue[2] xor fldValue[3] xor fldValue[4] xor fldValue[5] xor fldValue[6] xor fldValue[7];
        end;

        function VCoLong8.getKind(): int;
        begin
            result := KIND_LONG8;
        end;

        function VCoLong8.asByte8(): byte8;
        begin
            result := Cast.toByte8(fldValue);
        end;

        function VCoLong8.asShort8(): short8;
        begin
            result := Cast.toShort8(fldValue);
        end;

        function VCoLong8.asInt8(): int8;
        begin
            result := Cast.toInt8(fldValue);
        end;

        function VCoLong8.asLong8(): long8;
        begin
            result := fldValue;
        end;

        function VCoLong8.asFloat8(): float8;
        begin
            result := Cast.toFloat8(fldValue);
        end;

        function VCoLong8.asDouble8(): double8;
        begin
            result := Cast.toDouble8(fldValue);
        end;

        function VCoLong8.asReal(): real;
        begin
            result := fldValue[0];
        end;
    {%endregion}

    {%region  VCoFloat }
        constructor VCoFloat.create(const value: long);
        begin
            inherited create();
            fldValue := CoLong.toFloat(value);
        end;

        constructor VCoFloat.create(const value: real);
        begin
            inherited create();
            fldValue := CoReal.toFloat(value);
        end;

        function VCoFloat.equals(anot: TObject): boolean;
        begin
            result := (anot = self) or (anot is VCoFloat) and (int((@(VCoFloat(anot).fldValue))^) = int((@fldValue)^));
        end;

        function VCoFloat.getHashCode(): long;
        begin
            result := int((@fldValue)^);
        end;

        function VCoFloat.toString(): AnsiString;
        begin
            result := CoFloat.toString(fldValue);
        end;

        function VCoFloat.getKind(): int;
        begin
            result := KIND_FLOAT;
        end;

        function VCoFloat.isNaN(): boolean;
        begin
            result := CoFloat.isNaN(fldValue);
        end;

        function VCoFloat.isInfinite(): boolean;
        begin
            result := CoFloat.isInfinite(fldValue);
        end;

        function VCoFloat.asByte(): byte;
        begin
            result := byte(CoFloat.toInt(fldValue));
        end;

        function VCoFloat.asByte2(): byte2;
        begin
            result := byte(CoFloat.toInt(fldValue));
        end;

        function VCoFloat.asByte4(): byte4;
        begin
            result := byte(CoFloat.toInt(fldValue));
        end;

        function VCoFloat.asByte8(): byte8;
        begin
            result := byte(CoFloat.toInt(fldValue));
        end;

        function VCoFloat.asShort(): short;
        begin
            result := short(CoFloat.toInt(fldValue));
        end;

        function VCoFloat.asShort2(): short2;
        begin
            result := short(CoFloat.toInt(fldValue));
        end;

        function VCoFloat.asShort4(): short4;
        begin
            result := short(CoFloat.toInt(fldValue));
        end;

        function VCoFloat.asShort8(): short8;
        begin
            result := short(CoFloat.toInt(fldValue));
        end;

        function VCoFloat.asInt(): int;
        begin
            result := CoFloat.toInt(fldValue);
        end;

        function VCoFloat.asInt2(): int2;
        begin
            result := CoFloat.toInt(fldValue);
        end;

        function VCoFloat.asInt4(): int4;
        begin
            result := CoFloat.toInt(fldValue);
        end;

        function VCoFloat.asInt8(): int8;
        begin
            result := CoFloat.toInt(fldValue);
        end;

        function VCoFloat.asLong(): long;
        begin
            result := CoFloat.toLong(fldValue);
        end;

        function VCoFloat.asLong2(): long2;
        begin
            result := CoFloat.toLong(fldValue);
        end;

        function VCoFloat.asLong4(): long4;
        begin
            result := CoFloat.toLong(fldValue);
        end;

        function VCoFloat.asLong8(): long8;
        begin
            result := CoFloat.toLong(fldValue);
        end;

        function VCoFloat.asFloat(): float;
        begin
            result := fldValue;
        end;

        function VCoFloat.asFloat2(): float2;
        begin
            result := fldValue;
        end;

        function VCoFloat.asFloat4(): float4;
        begin
            result := fldValue;
        end;

        function VCoFloat.asFloat8(): float8;
        begin
            result := fldValue;
        end;

        function VCoFloat.asDouble(): double;
        begin
            result := fldValue;
        end;

        function VCoFloat.asDouble2(): double2;
        begin
            result := fldValue;
        end;

        function VCoFloat.asDouble4(): double4;
        begin
            result := fldValue;
        end;

        function VCoFloat.asDouble8(): double8;
        begin
            result := fldValue;
        end;

        function VCoFloat.asReal(): real;
        begin
            result := fldValue;
        end;
    {%endregion}

    {%region  VCoFloat2 }
        class function VCoFloat2.isNaN(const value: float2): boolean;
        begin
            result := value <> value;
        end;

        class function VCoFloat2.isInfinite(const value: float2): boolean;
        begin
            result := (Vector.eq(value, POSITIVE_INFINITY) or Vector.eq(value, NEGATIVE_INFINITY)) <> VCoInt2.ZERO;
        end;

        class function VCoFloat2.toInt2Bits(const value: float2): int2;
        begin
            result := int2((@value)^);
        end;

        constructor VCoFloat2.create(const value: long2);
        begin
            inherited create();
            fldValue := Cast.toFloat2(value);
        end;

        constructor VCoFloat2.create(const value: double2);
        begin
            inherited create();
            fldValue := Cast.toFloat2(value);
        end;

        function VCoFloat2.equals(anot: TObject): boolean;
        begin
            result := (anot = self) or (anot is VCoFloat2) and (int2((@(VCoFloat2(anot).fldValue))^) = int2((@fldValue)^));
        end;

        function VCoFloat2.getHashCode(): long;
        begin
            result := long((@fldValue)^);
        end;

        function VCoFloat2.getKind(): int;
        begin
            result := KIND_FLOAT2;
        end;

        function VCoFloat2.isNaN(): boolean;
        begin
            result := isNaN(fldValue);
        end;

        function VCoFloat2.isInfinite(): boolean;
        begin
            result := isInfinite(fldValue);
        end;

        function VCoFloat2.asByte2(): byte2;
        begin
            result := Cast.toByte2(fldValue);
        end;

        function VCoFloat2.asByte4(): byte4;
        begin
            result := Cast.toByte2(fldValue);
        end;

        function VCoFloat2.asByte8(): byte8;
        begin
            result := Cast.toByte2(fldValue);
        end;

        function VCoFloat2.asShort2(): short2;
        begin
            result := Cast.toShort2(fldValue);
        end;

        function VCoFloat2.asShort4(): short4;
        begin
            result := Cast.toShort2(fldValue);
        end;

        function VCoFloat2.asShort8(): short8;
        begin
            result := Cast.toShort2(fldValue);
        end;

        function VCoFloat2.asInt2(): int2;
        begin
            result := Cast.toInt2(fldValue);
        end;

        function VCoFloat2.asInt4(): int4;
        begin
            result := Cast.toInt2(fldValue);
        end;

        function VCoFloat2.asInt8(): int8;
        begin
            result := Cast.toInt2(fldValue);
        end;

        function VCoFloat2.asLong2(): long2;
        begin
            result := Cast.toLong2(fldValue);
        end;

        function VCoFloat2.asLong4(): long4;
        begin
            result := Cast.toLong2(fldValue);
        end;

        function VCoFloat2.asLong8(): long8;
        begin
            result := Cast.toLong2(fldValue);
        end;

        function VCoFloat2.asFloat2(): float2;
        begin
            result := fldValue;
        end;

        function VCoFloat2.asFloat4(): float4;
        begin
            result := fldValue;
        end;

        function VCoFloat2.asFloat8(): float8;
        begin
            result := fldValue;
        end;

        function VCoFloat2.asDouble2(): double2;
        begin
            result := fldValue;
        end;

        function VCoFloat2.asDouble4(): double4;
        begin
            result := fldValue;
        end;

        function VCoFloat2.asDouble8(): double8;
        begin
            result := fldValue;
        end;

        function VCoFloat2.asReal(): real;
        begin
            result := fldValue[0];
        end;
    {%endregion}

    {%region  VCoFloat4 }
        class function VCoFloat4.isNaN(const value: float4): boolean;
        begin
            result := value <> value;
        end;

        class function VCoFloat4.isInfinite(const value: float4): boolean;
        begin
            result := (Vector.eq(value, POSITIVE_INFINITY) or Vector.eq(value, NEGATIVE_INFINITY)) <> VCoInt4.ZERO;
        end;

        class function VCoFloat4.toInt4Bits(const value: float4): int4;
        begin
            result := int4((@value)^);
        end;

        constructor VCoFloat4.create(const value: long4);
        begin
            inherited create();
            fldValue := Cast.toFloat4(value);
        end;

        constructor VCoFloat4.create(const value: double4);
        begin
            inherited create();
            fldValue := Cast.toFloat4(value);
        end;

        function VCoFloat4.equals(anot: TObject): boolean;
        begin
            result := (anot = self) or (anot is VCoFloat4) and (int4((@(VCoFloat4(anot).fldValue))^) = int4((@fldValue)^));
        end;

        function VCoFloat4.getHashCode(): long;
        begin
            result := long((@(fldValue[0]))^) xor long((@(fldValue[2]))^);
        end;

        function VCoFloat4.getKind(): int;
        begin
            result := KIND_FLOAT4;
        end;

        function VCoFloat4.isNaN(): boolean;
        begin
            result := isNaN(fldValue);
        end;

        function VCoFloat4.isInfinite(): boolean;
        begin
            result := isInfinite(fldValue);
        end;

        function VCoFloat4.asByte4(): byte4;
        begin
            result := Cast.toByte4(fldValue);
        end;

        function VCoFloat4.asByte8(): byte8;
        begin
            result := Cast.toByte4(fldValue);
        end;

        function VCoFloat4.asShort4(): short4;
        begin
            result := Cast.toShort4(fldValue);
        end;

        function VCoFloat4.asShort8(): short8;
        begin
            result := Cast.toShort4(fldValue);
        end;

        function VCoFloat4.asInt4(): int4;
        begin
            result := Cast.toInt4(fldValue);
        end;

        function VCoFloat4.asInt8(): int8;
        begin
            result := Cast.toInt4(fldValue);
        end;

        function VCoFloat4.asLong4(): long4;
        begin
            result := Cast.toLong4(fldValue);
        end;

        function VCoFloat4.asLong8(): long8;
        begin
            result := Cast.toLong4(fldValue);
        end;

        function VCoFloat4.asFloat4(): float4;
        begin
            result := fldValue;
        end;

        function VCoFloat4.asFloat8(): float8;
        begin
            result := fldValue;
        end;

        function VCoFloat4.asDouble4(): double4;
        begin
            result := fldValue;
        end;

        function VCoFloat4.asDouble8(): double8;
        begin
            result := fldValue;
        end;

        function VCoFloat4.asReal(): real;
        begin
            result := fldValue[0];
        end;
    {%endregion}

    {%region  VCoFloat8 }
        class function VCoFloat8.isNaN(const value: float8): boolean;
        begin
            result := value <> value;
        end;

        class function VCoFloat8.isInfinite(const value: float8): boolean;
        begin
            result := (Vector.eq(value, POSITIVE_INFINITY) or Vector.eq(value, NEGATIVE_INFINITY)) <> VCoInt8.ZERO;
        end;

        class function VCoFloat8.toInt8Bits(const value: float8): int8;
        begin
            result := int8((@value)^);
        end;

        constructor VCoFloat8.create(const value: long8);
        begin
            inherited create();
            fldValue := Cast.toFloat8(value);
        end;

        constructor VCoFloat8.create(const value: double8);
        begin
            inherited create();
            fldValue := Cast.toFloat8(value);
        end;

        function VCoFloat8.equals(anot: TObject): boolean;
        begin
            result := (anot = self) or (anot is VCoFloat8) and (int8((@(VCoFloat8(anot).fldValue))^) = int8((@fldValue)^));
        end;

        function VCoFloat8.getHashCode(): long;
        begin
            result := long((@(fldValue[0]))^) xor long((@(fldValue[2]))^) xor long((@(fldValue[4]))^) xor long((@(fldValue[6]))^);
        end;

        function VCoFloat8.getKind(): int;
        begin
            result := KIND_FLOAT8;
        end;

        function VCoFloat8.isNaN(): boolean;
        begin
            result := isNaN(fldValue);
        end;

        function VCoFloat8.isInfinite(): boolean;
        begin
            result := isInfinite(fldValue);
        end;

        function VCoFloat8.asByte8(): byte8;
        begin
            result := Cast.toByte8(fldValue);
        end;

        function VCoFloat8.asShort8(): short8;
        begin
            result := Cast.toShort8(fldValue);
        end;

        function VCoFloat8.asInt8(): int8;
        begin
            result := Cast.toInt8(fldValue);
        end;

        function VCoFloat8.asLong8(): long8;
        begin
            result := Cast.toLong8(fldValue);
        end;

        function VCoFloat8.asFloat8(): float8;
        begin
            result := fldValue;
        end;

        function VCoFloat8.asDouble8(): double8;
        begin
            result := fldValue;
        end;

        function VCoFloat8.asReal(): real;
        begin
            result := fldValue[0];
        end;
    {%endregion}

    {%region  VCoDouble }
        constructor VCoDouble.create(const value: long);
        begin
            inherited create();
            fldValue := CoLong.toDouble(value);
        end;

        constructor VCoDouble.create(const value: real);
        begin
            inherited create();
            fldValue := CoReal.toDouble(value);
        end;

        function VCoDouble.equals(anot: TObject): boolean;
        begin
            result := (anot = self) or (anot is VCoDouble) and (long((@(VCoDouble(anot).fldValue))^) = long((@fldValue)^));
        end;

        function VCoDouble.getHashCode(): long;
        begin
            result := long((@fldValue)^);
        end;

        function VCoDouble.toString(): AnsiString;
        begin
            result := CoDouble.toString(fldValue);
        end;

        function VCoDouble.getKind(): int;
        begin
            result := KIND_DOUBLE;
        end;

        function VCoDouble.isNaN(): boolean;
        begin
            result := CoDouble.isNaN(fldValue);
        end;

        function VCoDouble.isInfinite(): boolean;
        begin
            result := CoDouble.isInfinite(fldValue);
        end;

        function VCoDouble.asByte(): byte;
        begin
            result := byte(CoDouble.toInt(fldValue));
        end;

        function VCoDouble.asByte2(): byte2;
        begin
            result := byte(CoDouble.toInt(fldValue));
        end;

        function VCoDouble.asByte4(): byte4;
        begin
            result := byte(CoDouble.toInt(fldValue));
        end;

        function VCoDouble.asByte8(): byte8;
        begin
            result := byte(CoDouble.toInt(fldValue));
        end;

        function VCoDouble.asShort(): short;
        begin
            result := short(CoDouble.toInt(fldValue));
        end;

        function VCoDouble.asShort2(): short2;
        begin
            result := short(CoDouble.toInt(fldValue));
        end;

        function VCoDouble.asShort4(): short4;
        begin
            result := short(CoDouble.toInt(fldValue));
        end;

        function VCoDouble.asShort8(): short8;
        begin
            result := short(CoDouble.toInt(fldValue));
        end;

        function VCoDouble.asInt(): int;
        begin
            result := CoDouble.toInt(fldValue);
        end;

        function VCoDouble.asInt2(): int2;
        begin
            result := CoDouble.toInt(fldValue);
        end;

        function VCoDouble.asInt4(): int4;
        begin
            result := CoDouble.toInt(fldValue);
        end;

        function VCoDouble.asInt8(): int8;
        begin
            result := CoDouble.toInt(fldValue);
        end;

        function VCoDouble.asLong(): long;
        begin
            result := CoDouble.toLong(fldValue);
        end;

        function VCoDouble.asLong2(): long2;
        begin
            result := CoDouble.toLong(fldValue);
        end;

        function VCoDouble.asLong4(): long4;
        begin
            result := CoDouble.toLong(fldValue);
        end;

        function VCoDouble.asLong8(): long8;
        begin
            result := CoDouble.toLong(fldValue);
        end;

        function VCoDouble.asFloat(): float;
        begin
            result := CoDouble.toFloat(fldValue);
        end;

        function VCoDouble.asFloat2(): float2;
        begin
            result := CoDouble.toFloat(fldValue);
        end;

        function VCoDouble.asFloat4(): float4;
        begin
            result := CoDouble.toFloat(fldValue);
        end;

        function VCoDouble.asFloat8(): float8;
        begin
            result := CoDouble.toFloat(fldValue);
        end;

        function VCoDouble.asDouble(): double;
        begin
            result := fldValue;
        end;

        function VCoDouble.asDouble2(): double2;
        begin
            result := fldValue;
        end;

        function VCoDouble.asDouble4(): double4;
        begin
            result := fldValue;
        end;

        function VCoDouble.asDouble8(): double8;
        begin
            result := fldValue;
        end;

        function VCoDouble.asReal(): real;
        begin
            result := fldValue;
        end;
    {%endregion}

    {%region  VCoDouble2 }
        class function VCoDouble2.isNaN(const value: double2): boolean;
        begin
            result := value <> value;
        end;

        class function VCoDouble2.isInfinite(const value: double2): boolean;
        begin
            result := (Vector.eq(value, POSITIVE_INFINITY) or Vector.eq(value, NEGATIVE_INFINITY)) <> VCoLong2.ZERO;
        end;

        class function VCoDouble2.toLong2Bits(const value: double2): long2;
        begin
            result := long2((@value)^);
        end;

        constructor VCoDouble2.create(const value: long2);
        begin
            inherited create();
            fldValue := Cast.toDouble2(value);
        end;

        constructor VCoDouble2.create(const value: double2);
        begin
            inherited create();
            fldValue := value;
        end;

        function VCoDouble2.equals(anot: TObject): boolean;
        begin
            result := (anot = self) or (anot is VCoDouble2) and (long2((@(VCoDouble2(anot).fldValue))^) = long2((@fldValue)^));
        end;

        function VCoDouble2.getHashCode(): long;
        begin
            result := long((@(fldValue[0]))^) xor long((@(fldValue[1]))^);
        end;

        function VCoDouble2.getKind(): int;
        begin
            result := KIND_DOUBLE2;
        end;

        function VCoDouble2.isNaN(): boolean;
        begin
            result := isNaN(fldValue);
        end;

        function VCoDouble2.isInfinite(): boolean;
        begin
            result := isInfinite(fldValue);
        end;

        function VCoDouble2.asByte2(): byte2;
        begin
            result := Cast.toByte2(fldValue);
        end;

        function VCoDouble2.asByte4(): byte4;
        begin
            result := Cast.toByte2(fldValue);
        end;

        function VCoDouble2.asByte8(): byte8;
        begin
            result := Cast.toByte2(fldValue);
        end;

        function VCoDouble2.asShort2(): short2;
        begin
            result := Cast.toShort2(fldValue);
        end;

        function VCoDouble2.asShort4(): short4;
        begin
            result := Cast.toShort2(fldValue);
        end;

        function VCoDouble2.asShort8(): short8;
        begin
            result := Cast.toShort2(fldValue);
        end;

        function VCoDouble2.asInt2(): int2;
        begin
            result := Cast.toInt2(fldValue);
        end;

        function VCoDouble2.asInt4(): int4;
        begin
            result := Cast.toInt2(fldValue);
        end;

        function VCoDouble2.asInt8(): int8;
        begin
            result := Cast.toInt2(fldValue);
        end;

        function VCoDouble2.asLong2(): long2;
        begin
            result := Cast.toLong2(fldValue);
        end;

        function VCoDouble2.asLong4(): long4;
        begin
            result := Cast.toLong2(fldValue);
        end;

        function VCoDouble2.asLong8(): long8;
        begin
            result := Cast.toLong2(fldValue);
        end;

        function VCoDouble2.asFloat2(): float2;
        begin
            result := Cast.toFloat2(fldValue);
        end;

        function VCoDouble2.asFloat4(): float4;
        begin
            result := Cast.toFloat2(fldValue);
        end;

        function VCoDouble2.asFloat8(): float8;
        begin
            result := Cast.toFloat2(fldValue);
        end;

        function VCoDouble2.asDouble2(): double2;
        begin
            result := fldValue;
        end;

        function VCoDouble2.asDouble4(): double4;
        begin
            result := fldValue;
        end;

        function VCoDouble2.asDouble8(): double8;
        begin
            result := fldValue;
        end;

        function VCoDouble2.asReal(): real;
        begin
            result := fldValue[0];
        end;
    {%endregion}

    {%region  VCoDouble4 }
        class function VCoDouble4.isNaN(const value: double4): boolean;
        begin
            result := value <> value;
        end;

        class function VCoDouble4.isInfinite(const value: double4): boolean;
        begin
            result := (Vector.eq(value, POSITIVE_INFINITY) or Vector.eq(value, NEGATIVE_INFINITY)) <> VCoLong4.ZERO;
        end;

        class function VCoDouble4.toLong4Bits(const value: double4): long4;
        begin
            result := long4((@value)^);
        end;

        constructor VCoDouble4.create(const value: long4);
        begin
            inherited create();
            fldValue := Cast.toDouble4(value);
        end;

        constructor VCoDouble4.create(const value: double4);
        begin
            inherited create();
            fldValue := value;
        end;

        function VCoDouble4.equals(anot: TObject): boolean;
        begin
            result := (anot = self) or (anot is VCoDouble4) and (long4((@(VCoDouble4(anot).fldValue))^) = long4((@fldValue)^));
        end;

        function VCoDouble4.getHashCode(): long;
        begin
            result := long((@(fldValue[0]))^) xor long((@(fldValue[1]))^) xor long((@(fldValue[2]))^) xor long((@(fldValue[3]))^);
        end;

        function VCoDouble4.getKind(): int;
        begin
            result := KIND_DOUBLE4;
        end;

        function VCoDouble4.isNaN(): boolean;
        begin
            result := isNaN(fldValue);
        end;

        function VCoDouble4.isInfinite(): boolean;
        begin
            result := isInfinite(fldValue);
        end;

        function VCoDouble4.asByte4(): byte4;
        begin
            result := Cast.toByte4(fldValue);
        end;

        function VCoDouble4.asByte8(): byte8;
        begin
            result := Cast.toByte4(fldValue);
        end;

        function VCoDouble4.asShort4(): short4;
        begin
            result := Cast.toShort4(fldValue);
        end;

        function VCoDouble4.asShort8(): short8;
        begin
            result := Cast.toShort4(fldValue);
        end;

        function VCoDouble4.asInt4(): int4;
        begin
            result := Cast.toInt4(fldValue);
        end;

        function VCoDouble4.asInt8(): int8;
        begin
            result := Cast.toInt4(fldValue);
        end;

        function VCoDouble4.asLong4(): long4;
        begin
            result := Cast.toLong4(fldValue);
        end;

        function VCoDouble4.asLong8(): long8;
        begin
            result := Cast.toLong4(fldValue);
        end;

        function VCoDouble4.asFloat4(): float4;
        begin
            result := Cast.toFloat4(fldValue);
        end;

        function VCoDouble4.asFloat8(): float8;
        begin
            result := Cast.toFloat4(fldValue);
        end;

        function VCoDouble4.asDouble4(): double4;
        begin
            result := fldValue;
        end;

        function VCoDouble4.asDouble8(): double8;
        begin
            result := fldValue;
        end;

        function VCoDouble4.asReal(): real;
        begin
            result := fldValue[0];
        end;
    {%endregion}

    {%region  VCoDouble8 }
        class function VCoDouble8.isNaN(const value: double8): boolean;
        begin
            result := value <> value;
        end;

        class function VCoDouble8.isInfinite(const value: double8): boolean;
        begin
            result := (Vector.eq(value, POSITIVE_INFINITY) or Vector.eq(value, NEGATIVE_INFINITY)) <> VCoLong8.ZERO;
        end;

        class function VCoDouble8.toLong8Bits(const value: double8): long8;
        begin
            result := long8((@value)^);
        end;

        constructor VCoDouble8.create(const value: long8);
        begin
            inherited create();
            fldValue := Cast.toDouble8(value);
        end;

        constructor VCoDouble8.create(const value: double8);
        begin
            inherited create();
            fldValue := value;
        end;

        function VCoDouble8.equals(anot: TObject): boolean;
        begin
            result := (anot = self) or (anot is VCoDouble8) and (long8((@(VCoDouble8(anot).fldValue))^) = long8((@fldValue)^));
        end;

        function VCoDouble8.getHashCode(): long;
        begin
            result :=
                long((@(fldValue[0]))^) xor long((@(fldValue[1]))^) xor long((@(fldValue[2]))^) xor long((@(fldValue[3]))^) xor
                long((@(fldValue[4]))^) xor long((@(fldValue[5]))^) xor long((@(fldValue[6]))^) xor long((@(fldValue[7]))^)
            ;
        end;

        function VCoDouble8.getKind(): int;
        begin
            result := KIND_DOUBLE8;
        end;

        function VCoDouble8.isNaN(): boolean;
        begin
            result := isNaN(fldValue);
        end;

        function VCoDouble8.isInfinite(): boolean;
        begin
            result := isInfinite(fldValue);
        end;

        function VCoDouble8.asByte8(): byte8;
        begin
            result := Cast.toByte8(fldValue);
        end;

        function VCoDouble8.asShort8(): short8;
        begin
            result := Cast.toShort8(fldValue);
        end;

        function VCoDouble8.asInt8(): int8;
        begin
            result := Cast.toInt8(fldValue);
        end;

        function VCoDouble8.asLong8(): long8;
        begin
            result := Cast.toLong8(fldValue);
        end;

        function VCoDouble8.asFloat8(): float8;
        begin
            result := Cast.toFloat8(fldValue);
        end;

        function VCoDouble8.asDouble8(): double8;
        begin
            result := fldValue;
        end;

        function VCoDouble8.asReal(): real;
        begin
            result := fldValue[0];
        end;
    {%endregion}

    {%region  VCoReal }
        class function VCoReal.toLong2Bits(const value: real): long2;
        var
            struct: RealStruct absolute value;
        begin
            result[0] := struct.significand;
            result[1] := struct.exponent;
        end;

        constructor VCoReal.create(const value: long);
        begin
            inherited create();
            fldValue := CoLong.toReal(value);
        end;

        constructor VCoReal.create(const value: real);
        begin
            inherited create();
            fldValue := value;
        end;

        function VCoReal.equals(anot: TObject): boolean;
        begin
            result := (anot = self) or (anot is VCoReal) and (toLong2Bits(VCoReal(anot).fldValue) = toLong2Bits(fldValue));
        end;

        function VCoReal.getHashCode(): long;
        var
            hash: long2;
        begin
            hash := toLong2Bits(fldValue) and MASK;
            result := hash[0] xor hash[1];
        end;

        function VCoReal.toString(): AnsiString;
        begin
            result := CoReal.toString(fldValue);
        end;

        function VCoReal.getKind(): int;
        begin
            result := KIND_REAL;
        end;

        function VCoReal.isNaN(): boolean;
        begin
            result := CoReal.isNaN(fldValue);
        end;

        function VCoReal.isInfinite(): boolean;
        begin
            result := CoReal.isInfinite(fldValue);
        end;

        function VCoReal.asByte(): byte;
        begin
            result := byte(CoReal.toInt(fldValue));
        end;

        function VCoReal.asByte2(): byte2;
        begin
            result := byte(CoReal.toInt(fldValue));
        end;

        function VCoReal.asByte4(): byte4;
        begin
            result := byte(CoReal.toInt(fldValue));
        end;

        function VCoReal.asByte8(): byte8;
        begin
            result := byte(CoReal.toInt(fldValue));
        end;

        function VCoReal.asShort(): short;
        begin
            result := short(CoReal.toInt(fldValue));
        end;

        function VCoReal.asShort2(): short2;
        begin
            result := short(CoReal.toInt(fldValue));
        end;

        function VCoReal.asShort4(): short4;
        begin
            result := short(CoReal.toInt(fldValue));
        end;

        function VCoReal.asShort8(): short8;
        begin
            result := short(CoReal.toInt(fldValue));
        end;

        function VCoReal.asInt(): int;
        begin
            result := CoReal.toInt(fldValue);
        end;

        function VCoReal.asInt2(): int2;
        begin
            result := CoReal.toInt(fldValue);
        end;

        function VCoReal.asInt4(): int4;
        begin
            result := CoReal.toInt(fldValue);
        end;

        function VCoReal.asInt8(): int8;
        begin
            result := CoReal.toInt(fldValue);
        end;

        function VCoReal.asLong(): long;
        begin
            result := CoReal.toLong(fldValue);
        end;

        function VCoReal.asLong2(): long2;
        begin
            result := CoReal.toLong(fldValue);
        end;

        function VCoReal.asLong4(): long4;
        begin
            result := CoReal.toLong(fldValue);
        end;

        function VCoReal.asLong8(): long8;
        begin
            result := CoReal.toLong(fldValue);
        end;

        function VCoReal.asFloat(): float;
        begin
            result := CoReal.toFloat(fldValue);
        end;

        function VCoReal.asFloat2(): float2;
        begin
            result := CoReal.toFloat(fldValue);
        end;

        function VCoReal.asFloat4(): float4;
        begin
            result := CoReal.toFloat(fldValue);
        end;

        function VCoReal.asFloat8(): float8;
        begin
            result := CoReal.toFloat(fldValue);
        end;

        function VCoReal.asDouble(): double;
        begin
            result := CoReal.toDouble(fldValue);
        end;

        function VCoReal.asDouble2(): double2;
        begin
            result := CoReal.toDouble(fldValue);
        end;

        function VCoReal.asDouble4(): double4;
        begin
            result := CoReal.toDouble(fldValue);
        end;

        function VCoReal.asDouble8(): double8;
        begin
            result := CoReal.toDouble(fldValue);
        end;

        function VCoReal.asReal(): real;
        begin
            result := fldValue;
        end;
    {%endregion}

    {%region} initialization
        Lang.registerInterfaces([
            typeInfo(Numeric)
        ]);
    {%endregion}

end.