Class ScalarConstants
- Namespace
- Zyl.VectorTraits.Impl
- Assembly
- VectorTraits.dll
The constants of scalar (标量的常数).
public static class ScalarConstants
- Inheritance
-
ScalarConstants
- Inherited Members
Fields
- DoubleVal_2Pow51
DoubleVal -
(double)0x0008000000000000 = pow(2, 51) = 2251799813685248
. Binary is0x43200000_00000000
.
- DoubleVal_2Pow52
DoubleVal -
(double)0x0010000000000000 = pow(2, 52) = 4503599627370496
. Binary is0x43300000_00000000
.
- DoubleVal_2Pow52_2Pow51
DoubleVal -
(double)0x0018000000000000 = pow(2, 52) + pow(2, 51) = 1.5*pow(2, 52) = 6755399441055744
. Binary is0x43380000_00000000
.
- DoubleVal_2Pow84
DoubleVal -
(double)pow(2, 84).
BitConverter.Int64BitsToDouble(0x45300000_00000000) = 1.9342813113834067E+25,
BitConverter.DoubleToInt64Bits(1.9342813113834067E+25).ToString("X16") = "4530000000000000"`.
- DoubleVal_2Pow84_2Pow52
DoubleVal -
(double)pow(2, 84) + pow(2, 52).
BitConverter.Int64BitsToDouble(0x45300000_00100000) = 1.9342813118337666E+25,
BitConverter.DoubleToInt64Bits(1.9342813118337666E+25).ToString("X16") = "4530000000100000"`.
- DoubleVal_2Pow84_2Pow63
DoubleVal -
(double)pow(2, 84) + pow(2, 63).
BitConverter.Int64BitsToDouble(0x45300000_80000000) = 1.9342822337206104E+25,
BitConverter.DoubleToInt64Bits(1.9342822337206104E+25).ToString("X16") = "4530000080000000"`.
- DoubleVal_2Pow84_2Pow63_2Pow52
DoubleVal -
(double)pow(2, 84) + pow(2, 63) + pow(2, 52)
.BitConverter.Int64BitsToDouble(0x45300000_80100000) = 1.9342822337206104E+25
,BitConverter.DoubleToInt64Bits(1.9342822341709703E+25).ToString("X16") = "4530000080100000"
.
- DoubleVal_ExponentMask
DoubleVal - Exponent mask (指数掩码). Binary is
0x7FF0000000000000L
.
- DoubleVal_MantissaMask
DoubleVal - Mantissa mask (尾数掩码). Binary is
0x000FFFFFFFFFFFFFL
.
- DoubleVal_MaskLow32
DoubleVal - Mask of low 32-bit (低32位的掩码). Binary is
0x00000000_FFFFFFFFL
.
- DoubleVal_NonExponentMask
DoubleVal - Non-exponent mask (非指数掩码). Binary is
0x800FFFFFFFFFFFFFL
.
- DoubleVal_NonMantissaMask
DoubleVal - Non-mantissa mask (非尾数掩码). Binary is
0xFFF0000000000000L
.
- DoubleVal_SignMask
DoubleVal - Sign mask (符号掩码). Binary is
0x8000000000000000L
.
- DoubleVal_Truncate_expMinuend
DoubleVal - Truncate - expMinuend.
((long)Double_ExponentBias * 2 + Double_ExponentShift) << Double_ExponentShift = ((long)1023*2 + 52)<<52 = 0x8320000000000000 = -8998192055486251008
.BitConverter.Int64BitsToDouble(-8998192055486251008) = -1.252605225005608E-293
,BitConverter.DoubleToInt64Bits(-1.252605225005608E-293).ToString("X") = "8320000000000000"
.
- Double_ExponentBias
Double - Exponent bias (指数偏移值). Value is
1023
.
- Double_ExponentBias_Max
Double - The maximum value for exponential bias (指数偏移时的最大值). Value is
1023
.
- Double_ExponentBias_Min
Double - The minimum value for exponential bias (指数偏移时的最小值). Value is
-1022
.
- Double_ExponentBits
Double - Exponent bit size (指数位数). Value is
11
.
- Double_ExponentInfinity
Double - Exponent value at infinite or NaN (无穷或非数时的指数值). Value is
2047
.
- Double_ExponentMask
Double - Exponent mask (指数掩码). Binary is
0x7FF0000000000000L
.
- Double_ExponentShift
Double - Exponent shift bit (指数位移). Value is
52
.
- Double_MantissaBits
Double - Mantissa bit size (尾数位数). Value is
52
.
- Double_MantissaMask
Double - Mantissa mask (尾数掩码). Binary is
0x000FFFFFFFFFFFFFL
.
- Double_MantissaShift
Double - Mantissa shift bit (尾数位移). Value is
0
.
- Double_NonExponentMask
Double - Non-exponent mask (非指数掩码). Binary is
0x800FFFFFFFFFFFFFL
.
- Double_NonMantissaMask
Double - Non-mantissa mask (非尾数掩码). Binary is
0xFFF0000000000000L
.
- Double_NonSignMask
Double - Non-sign mask (非符号掩码). Binary is
0x7FFFFFFFFFFFFFFFL
.
- Double_SignBits
Double - Sign bit size (符号位数). Value is
1
.
- Double_SignMask
Double - Sign mask (符号掩码). Binary is
0x8000000000000000L
.
- Double_SignShift
Double - Sign shift bit (符号位移). Value is
52+11=63
.
- Half_ExponentBias
Half - Exponent bias (指数偏移值). Value is
15
.
- Half_ExponentBias_Max
Half - The maximum value for exponential bias (指数偏移时的最大值). Value is
15
.
- Half_ExponentBias_Min
Half - The minimum value for exponential bias (指数偏移时的最小值). Value is
-14
.
- Half_ExponentBits
Half - Exponent bit size (指数位数). Value is
5
.
- Half_ExponentInfinity
Half - Exponent value at infinite or NaN (无穷或非数时的指数值). Value is
31
.
- Half_ExponentMask
Half - Exponent mask (指数掩码). Value is
0x7C00
.
- Half_ExponentShift
Half - Exponent shift bit (指数位移). Value is
10
.
- Half_MantissaBits
Half - Mantissa bit size (尾数位数). Value is
10
.
- Half_MantissaMask
Half - Mantissa mask (尾数掩码). Value is
0x03FF
.
- Half_MantissaShift
Half - Mantissa shift bit (尾数位移). Value is
0
.
- Half_NonExponentMask
Half - Non-exponent mask (非指数掩码). Value is
0x83FF
.
- Half_NonMantissaMask
Half - Non-mantissa mask (非尾数掩码). Value is
0xFC00
.
- Half_NonSignMask
Half - Non-sign mask (非符号掩码). Value is
0x7FFF
.
- Half_SignBits
Half - Sign bit size (符号位数). Value is
1
.
- Half_SignMask
Half - Sign mask (符号掩码). Value is
0x8000
.
- Half_SignShift
Half - Sign shift bit (符号位移). Value is
10+5=15
.
- IntDbl_2Pow52
IntDbl -
(long)pow(2, 52) = 0x00100000_00000000 = 4503599627370496
.BitConverter.Int64BitsToDouble(0x00100000_00000000) = 2.2250738585072014E-308
,BitConverter.DoubleToInt64Bits(2.2250738585072014E-308).ToString("X16") = "0010000000000000"
.
- IntDbl_DoubleBias52
IntDbl -
(long)ScalarConstants.Double_ExponentBias + ScalarConstants.Double_MantissaBits = 1023 + 52 = 1075 = 0x433
.BitConverter.Int64BitsToDouble(1075) = 5.3112056927934E-321
,BitConverter.DoubleToInt64Bits(5.3112056927934E-321).ToString("X") = "433"
.
- IntDbl_DoubleBias62
IntDbl -
(long)ScalarConstants.Double_ExponentBias + 63-1 = 1023 + 62 = 1085 = 0x43D
.BitConverter.Int64BitsToDouble(1085) = 5.36061225737753E-321
,BitConverter.DoubleToInt64Bits(5.36061225737753E-321).ToString("X") = "43D"
.
- Int_2Pow23
Integer -
(int)pow(2, 23) = 0x00800000 = 8388608
.
- Int_SingleBias23
Integer -
(int)Single_ExponentBias + Single_MantissaBits = 127 + 23 = 150 = 0x96
.
- Int_VMaxUInt32
Integer -
(long)uint.MaxValue = 0x0_FFFFFFFFL = 4294967295
. Fixed a bug in Arm: wrongly optimize(long)uint.MaxValue
to(long)-1
.
- SingleBit_2Pow23
SingleBit -
(float)0x00800000 = pow(2, 23) = 8388608
. Binary is0x4B000000
.
- SingleBit_2Pow31
SingleBit -
(float)0x80000000U = pow(2, 31) = 2147483648
. Binary is0x4F000000
.
- SingleBit_2Pow32
SingleBit -
pow(2, 32) = 4294967296
. Binary is0x4F800000
.
- SingleBit_2PowNegative32
SingleBit -
pow(2, -32) = 1.0/pow(2, 32) = 1.0/4294967296 = 2.3283064365386963E-10
.BitConverter.SingleToInt32Bits((float)Math.Pow(2, -32)).ToString("X8") = "2F800000"
.
- SingleBit_Negative2Pow31
SingleBit -
(float)0x80000000 = -pow(2, 31) = -2147483648
. Binary is0xCF000000
.
- SingleBit_Negative2Pow32
SingleBit -
-pow(2, 32) = -4294967296
. Binary is0xCF800000
.
- SingleBit_Truncate_expMinuend
SingleBit - Truncate - expMinuend.
((int)Single_ExponentBias * 2 + Single_ExponentShift) << Single_ExponentShift = ((int)127*2 + 23)<<23 = 0x8A800000 = -1971322880
.BitConverter.Int32BitsToSingle(-1971322880) = -1.2325952E-32
,BitConverter.SingleToInt32Bits(-1.2325952E-32).ToString("X") = "8A800000"
.
- SingleVal_2Pow23
SingleVal -
(float)0x00800000 = pow(2, 23) = 8388608
. Binary is0x4B000000
.
- SingleVal_2Pow31
SingleVal -
(float)0x80000000U = pow(2, 31) = 2147483648
. Binary is0x4F000000
.
- SingleVal_2Pow32
SingleVal -
pow(2, 32) = 4294967296
. Binary is0x4F800000
.
- SingleVal_ExponentMask
SingleVal - Exponent mask (指数掩码). Binary is
0x7F800000
.
- SingleVal_MantissaMask
SingleVal - Mantissa mask (尾数掩码). Binary is
0x007FFFFF
.
- SingleVal_Negative2Pow31
SingleVal -
(float)0x80000000 = -pow(2, 31) = -2147483648
. Binary is0xCF000000
.
- SingleVal_Negative2Pow32
SingleVal -
-pow(2, 32) = -4294967296
. Binary is0xCF800000
.
- SingleVal_NonExponentMask
SingleVal - Non-exponent mask (非指数掩码). Binary is
0x807FFFFF
.
- SingleVal_NonMantissaMask
SingleVal - Non-mantissa mask (非尾数掩码). Binary is
0xFF800000
.
- SingleVal_SignMask
SingleVal - Sign mask (符号掩码). Binary is
0x80000000
.
- Single_ExponentBias
Single - Exponent bias (指数偏移值). Value is
127
.
- Single_ExponentBias_Max
Single - The maximum value for exponential bias (指数偏移时的最大值). Value is
127
.
- Single_ExponentBias_Min
Single - The minimum value for exponential bias (指数偏移时的最小值). Value is
-126
.
- Single_ExponentBits
Single - Exponent bit size (指数位数). Value is
8
.
- Single_ExponentInfinity
Single - Exponent value at infinite or NaN (无穷或非数时的指数值). Value is
255
.
- Single_ExponentMask
Single - Exponent mask (指数掩码). Binary is
0x7F800000
.
- Single_ExponentShift
Single - Exponent shift bit (指数位移). Value is
23
.
- Single_MantissaBits
Single - Mantissa bit size (尾数位数). Value is
23
.
- Single_MantissaMask
Single - Mantissa mask (尾数掩码). Binary is
0x007FFFFF
.
- Single_MantissaShift
Single - Mantissa shift bit (尾数位移). Value is
0
.
- Single_NonExponentMask
Single - Non-exponent mask (非指数掩码). Binary is
0x807FFFFF
.
- Single_NonMantissaMask
Single - Non-mantissa mask (非尾数掩码). Binary is
0xFF800000
.
- Single_NonSignMask
Single - Non-sign mask (非符号掩码). Binary is
0x7FFFFFFF
.
- Single_SignBits
Single - Sign bit size (符号位数). Value is
1
.
- Single_SignMask
Single - Sign mask (符号掩码). Binary is
0x80000000
.
- Single_SignShift
Single - Sign shift bit (符号位移). Value is
23+8=31
.