Half 结构
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
表示半精度浮点数。
public value class Half : IComparable, IComparable<Half>, IEquatable<Half>, IFormattable
public value class Half : IComparable, IComparable<Half>, IEquatable<Half>, ISpanFormattable
public value class Half : IComparable<Half>, IEquatable<Half>, IParsable<Half>, ISpanParsable<Half>, System::Numerics::IAdditionOperators<Half, Half, Half>, System::Numerics::IAdditiveIdentity<Half, Half>, System::Numerics::IBinaryFloatingPointIeee754<Half>, System::Numerics::IBinaryNumber<Half>, System::Numerics::IBitwiseOperators<Half, Half, Half>, System::Numerics::IComparisonOperators<Half, Half, bool>, System::Numerics::IDecrementOperators<Half>, System::Numerics::IDivisionOperators<Half, Half, Half>, System::Numerics::IEqualityOperators<Half, Half, bool>, System::Numerics::IExponentialFunctions<Half>, System::Numerics::IFloatingPoint<Half>, System::Numerics::IFloatingPointConstants<Half>, System::Numerics::IFloatingPointIeee754<Half>, System::Numerics::IHyperbolicFunctions<Half>, System::Numerics::IIncrementOperators<Half>, System::Numerics::ILogarithmicFunctions<Half>, System::Numerics::IMinMaxValue<Half>, System::Numerics::IModulusOperators<Half, Half, Half>, System::Numerics::IMultiplicativeIdentity<Half, Half>, System::Numerics::IMultiplyOperators<Half, Half, Half>, System::Numerics::INumber<Half>, System::Numerics::INumberBase<Half>, System::Numerics::IPowerFunctions<Half>, System::Numerics::IRootFunctions<Half>, System::Numerics::ISignedNumber<Half>, System::Numerics::ISubtractionOperators<Half, Half, Half>, System::Numerics::ITrigonometricFunctions<Half>, System::Numerics::IUnaryNegationOperators<Half, Half>, System::Numerics::IUnaryPlusOperators<Half, Half>
public value class Half : IComparable<Half>, IEquatable<Half>, IParsable<Half>, ISpanParsable<Half>, IUtf8SpanParsable<Half>, System::Numerics::IAdditionOperators<Half, Half, Half>, System::Numerics::IAdditiveIdentity<Half, Half>, System::Numerics::IBinaryFloatingPointIeee754<Half>, System::Numerics::IBinaryNumber<Half>, System::Numerics::IBitwiseOperators<Half, Half, Half>, System::Numerics::IComparisonOperators<Half, Half, bool>, System::Numerics::IDecrementOperators<Half>, System::Numerics::IDivisionOperators<Half, Half, Half>, System::Numerics::IEqualityOperators<Half, Half, bool>, System::Numerics::IExponentialFunctions<Half>, System::Numerics::IFloatingPoint<Half>, System::Numerics::IFloatingPointConstants<Half>, System::Numerics::IFloatingPointIeee754<Half>, System::Numerics::IHyperbolicFunctions<Half>, System::Numerics::IIncrementOperators<Half>, System::Numerics::ILogarithmicFunctions<Half>, System::Numerics::IMinMaxValue<Half>, System::Numerics::IModulusOperators<Half, Half, Half>, System::Numerics::IMultiplicativeIdentity<Half, Half>, System::Numerics::IMultiplyOperators<Half, Half, Half>, System::Numerics::INumber<Half>, System::Numerics::INumberBase<Half>, System::Numerics::IPowerFunctions<Half>, System::Numerics::IRootFunctions<Half>, System::Numerics::ISignedNumber<Half>, System::Numerics::ISubtractionOperators<Half, Half, Half>, System::Numerics::ITrigonometricFunctions<Half>, System::Numerics::IUnaryNegationOperators<Half, Half>, System::Numerics::IUnaryPlusOperators<Half, Half>
public readonly struct Half : IComparable, IComparable<Half>, IEquatable<Half>, IFormattable
public readonly struct Half : IComparable, IComparable<Half>, IEquatable<Half>, ISpanFormattable
public readonly struct Half : IComparable<Half>, IEquatable<Half>, IParsable<Half>, ISpanParsable<Half>, System.Numerics.IAdditionOperators<Half,Half,Half>, System.Numerics.IAdditiveIdentity<Half,Half>, System.Numerics.IBinaryFloatingPointIeee754<Half>, System.Numerics.IBinaryNumber<Half>, System.Numerics.IBitwiseOperators<Half,Half,Half>, System.Numerics.IComparisonOperators<Half,Half,bool>, System.Numerics.IDecrementOperators<Half>, System.Numerics.IDivisionOperators<Half,Half,Half>, System.Numerics.IEqualityOperators<Half,Half,bool>, System.Numerics.IExponentialFunctions<Half>, System.Numerics.IFloatingPoint<Half>, System.Numerics.IFloatingPointConstants<Half>, System.Numerics.IFloatingPointIeee754<Half>, System.Numerics.IHyperbolicFunctions<Half>, System.Numerics.IIncrementOperators<Half>, System.Numerics.ILogarithmicFunctions<Half>, System.Numerics.IMinMaxValue<Half>, System.Numerics.IModulusOperators<Half,Half,Half>, System.Numerics.IMultiplicativeIdentity<Half,Half>, System.Numerics.IMultiplyOperators<Half,Half,Half>, System.Numerics.INumber<Half>, System.Numerics.INumberBase<Half>, System.Numerics.IPowerFunctions<Half>, System.Numerics.IRootFunctions<Half>, System.Numerics.ISignedNumber<Half>, System.Numerics.ISubtractionOperators<Half,Half,Half>, System.Numerics.ITrigonometricFunctions<Half>, System.Numerics.IUnaryNegationOperators<Half,Half>, System.Numerics.IUnaryPlusOperators<Half,Half>
public readonly struct Half : IComparable<Half>, IEquatable<Half>, IParsable<Half>, ISpanParsable<Half>, IUtf8SpanParsable<Half>, System.Numerics.IAdditionOperators<Half,Half,Half>, System.Numerics.IAdditiveIdentity<Half,Half>, System.Numerics.IBinaryFloatingPointIeee754<Half>, System.Numerics.IBinaryNumber<Half>, System.Numerics.IBitwiseOperators<Half,Half,Half>, System.Numerics.IComparisonOperators<Half,Half,bool>, System.Numerics.IDecrementOperators<Half>, System.Numerics.IDivisionOperators<Half,Half,Half>, System.Numerics.IEqualityOperators<Half,Half,bool>, System.Numerics.IExponentialFunctions<Half>, System.Numerics.IFloatingPoint<Half>, System.Numerics.IFloatingPointConstants<Half>, System.Numerics.IFloatingPointIeee754<Half>, System.Numerics.IHyperbolicFunctions<Half>, System.Numerics.IIncrementOperators<Half>, System.Numerics.ILogarithmicFunctions<Half>, System.Numerics.IMinMaxValue<Half>, System.Numerics.IModulusOperators<Half,Half,Half>, System.Numerics.IMultiplicativeIdentity<Half,Half>, System.Numerics.IMultiplyOperators<Half,Half,Half>, System.Numerics.INumber<Half>, System.Numerics.INumberBase<Half>, System.Numerics.IPowerFunctions<Half>, System.Numerics.IRootFunctions<Half>, System.Numerics.ISignedNumber<Half>, System.Numerics.ISubtractionOperators<Half,Half,Half>, System.Numerics.ITrigonometricFunctions<Half>, System.Numerics.IUnaryNegationOperators<Half,Half>, System.Numerics.IUnaryPlusOperators<Half,Half>
type Half = struct
interface IFormattable
type Half = struct
interface ISpanFormattable
interface IFormattable
type Half = struct
interface IFormattable
interface IParsable<Half>
interface ISpanFormattable
interface ISpanParsable<Half>
interface IAdditionOperators<Half, Half, Half>
interface IAdditiveIdentity<Half, Half>
interface IBinaryFloatingPointIeee754<Half>
interface IBinaryNumber<Half>
interface IBitwiseOperators<Half, Half, Half>
interface IComparisonOperators<Half, Half, bool>
interface IEqualityOperators<Half, Half, bool>
interface IDecrementOperators<Half>
interface IDivisionOperators<Half, Half, Half>
interface IIncrementOperators<Half>
interface IModulusOperators<Half, Half, Half>
interface IMultiplicativeIdentity<Half, Half>
interface IMultiplyOperators<Half, Half, Half>
interface INumber<Half>
interface INumberBase<Half>
interface ISubtractionOperators<Half, Half, Half>
interface IUnaryNegationOperators<Half, Half>
interface IUnaryPlusOperators<Half, Half>
interface IExponentialFunctions<Half>
interface IFloatingPointConstants<Half>
interface IFloatingPoint<Half>
interface ISignedNumber<Half>
interface IFloatingPointIeee754<Half>
interface IHyperbolicFunctions<Half>
interface ILogarithmicFunctions<Half>
interface IPowerFunctions<Half>
interface IRootFunctions<Half>
interface ITrigonometricFunctions<Half>
interface IMinMaxValue<Half>
type Half = struct
interface IFormattable
interface IParsable<Half>
interface ISpanFormattable
interface ISpanParsable<Half>
interface IAdditionOperators<Half, Half, Half>
interface IAdditiveIdentity<Half, Half>
interface IBinaryFloatingPointIeee754<Half>
interface IBinaryNumber<Half>
interface IBitwiseOperators<Half, Half, Half>
interface IComparisonOperators<Half, Half, bool>
interface IEqualityOperators<Half, Half, bool>
interface IDecrementOperators<Half>
interface IDivisionOperators<Half, Half, Half>
interface IIncrementOperators<Half>
interface IModulusOperators<Half, Half, Half>
interface IMultiplicativeIdentity<Half, Half>
interface IMultiplyOperators<Half, Half, Half>
interface INumber<Half>
interface INumberBase<Half>
interface ISubtractionOperators<Half, Half, Half>
interface IUnaryNegationOperators<Half, Half>
interface IUnaryPlusOperators<Half, Half>
interface IUtf8SpanFormattable
interface IUtf8SpanParsable<Half>
interface IExponentialFunctions<Half>
interface IFloatingPointConstants<Half>
interface IFloatingPoint<Half>
interface ISignedNumber<Half>
interface IFloatingPointIeee754<Half>
interface IHyperbolicFunctions<Half>
interface ILogarithmicFunctions<Half>
interface IPowerFunctions<Half>
interface IRootFunctions<Half>
interface ITrigonometricFunctions<Half>
interface IMinMaxValue<Half>
type Half = struct
interface IFormattable
interface IParsable<Half>
interface ISpanFormattable
interface ISpanParsable<Half>
interface IUtf8SpanFormattable
interface IUtf8SpanParsable<Half>
interface IAdditionOperators<Half, Half, Half>
interface IAdditiveIdentity<Half, Half>
interface IBinaryFloatingPointIeee754<Half>
interface IBinaryNumber<Half>
interface IBitwiseOperators<Half, Half, Half>
interface IComparisonOperators<Half, Half, bool>
interface IEqualityOperators<Half, Half, bool>
interface IDecrementOperators<Half>
interface IDivisionOperators<Half, Half, Half>
interface IIncrementOperators<Half>
interface IModulusOperators<Half, Half, Half>
interface IMultiplicativeIdentity<Half, Half>
interface IMultiplyOperators<Half, Half, Half>
interface INumber<Half>
interface INumberBase<Half>
interface ISubtractionOperators<Half, Half, Half>
interface IUnaryNegationOperators<Half, Half>
interface IUnaryPlusOperators<Half, Half>
interface IExponentialFunctions<Half>
interface IFloatingPointConstants<Half>
interface IFloatingPoint<Half>
interface ISignedNumber<Half>
interface IFloatingPointIeee754<Half>
interface IHyperbolicFunctions<Half>
interface ILogarithmicFunctions<Half>
interface IPowerFunctions<Half>
interface IRootFunctions<Half>
interface ITrigonometricFunctions<Half>
interface IMinMaxValue<Half>
Public Structure Half
Implements IComparable, IComparable(Of Half), IEquatable(Of Half), IFormattable
Public Structure Half
Implements IComparable, IComparable(Of Half), IEquatable(Of Half), ISpanFormattable
Public Structure Half
Implements IAdditionOperators(Of Half, Half, Half), IAdditiveIdentity(Of Half, Half), IBinaryFloatingPointIeee754(Of Half), IBinaryNumber(Of Half), IBitwiseOperators(Of Half, Half, Half), IComparable(Of Half), IComparisonOperators(Of Half, Half, Boolean), IDecrementOperators(Of Half), IDivisionOperators(Of Half, Half, Half), IEqualityOperators(Of Half, Half, Boolean), IEquatable(Of Half), IExponentialFunctions(Of Half), IFloatingPoint(Of Half), IFloatingPointConstants(Of Half), IFloatingPointIeee754(Of Half), IHyperbolicFunctions(Of Half), IIncrementOperators(Of Half), ILogarithmicFunctions(Of Half), IMinMaxValue(Of Half), IModulusOperators(Of Half, Half, Half), IMultiplicativeIdentity(Of Half, Half), IMultiplyOperators(Of Half, Half, Half), INumber(Of Half), INumberBase(Of Half), IParsable(Of Half), IPowerFunctions(Of Half), IRootFunctions(Of Half), ISignedNumber(Of Half), ISpanParsable(Of Half), ISubtractionOperators(Of Half, Half, Half), ITrigonometricFunctions(Of Half), IUnaryNegationOperators(Of Half, Half), IUnaryPlusOperators(Of Half, Half)
Public Structure Half
Implements IAdditionOperators(Of Half, Half, Half), IAdditiveIdentity(Of Half, Half), IBinaryFloatingPointIeee754(Of Half), IBinaryNumber(Of Half), IBitwiseOperators(Of Half, Half, Half), IComparable(Of Half), IComparisonOperators(Of Half, Half, Boolean), IDecrementOperators(Of Half), IDivisionOperators(Of Half, Half, Half), IEqualityOperators(Of Half, Half, Boolean), IEquatable(Of Half), IExponentialFunctions(Of Half), IFloatingPoint(Of Half), IFloatingPointConstants(Of Half), IFloatingPointIeee754(Of Half), IHyperbolicFunctions(Of Half), IIncrementOperators(Of Half), ILogarithmicFunctions(Of Half), IMinMaxValue(Of Half), IModulusOperators(Of Half, Half, Half), IMultiplicativeIdentity(Of Half, Half), IMultiplyOperators(Of Half, Half, Half), INumber(Of Half), INumberBase(Of Half), IParsable(Of Half), IPowerFunctions(Of Half), IRootFunctions(Of Half), ISignedNumber(Of Half), ISpanParsable(Of Half), ISubtractionOperators(Of Half, Half, Half), ITrigonometricFunctions(Of Half), IUnaryNegationOperators(Of Half, Half), IUnaryPlusOperators(Of Half, Half), IUtf8SpanParsable(Of Half)
- 继承
- 实现
-
IComparable IComparable<Half> IEquatable<Half> IFormattable ISpanFormattable IComparable<TSelf> IEquatable<TSelf> IParsable<Half> IParsable<TSelf> ISpanParsable<Half> ISpanParsable<TSelf> IAdditionOperators<Half,Half,Half> IAdditionOperators<TSelf,TSelf,TSelf> IAdditiveIdentity<Half,Half> IAdditiveIdentity<TSelf,TSelf> IBinaryFloatingPointIeee754<Half> IBinaryNumber<Half> IBinaryNumber<TSelf> IBitwiseOperators<Half,Half,Half> IBitwiseOperators<TSelf,TSelf,TSelf> IComparisonOperators<Half,Half,Boolean> IComparisonOperators<TSelf,TSelf,Boolean> IDecrementOperators<Half> IDecrementOperators<TSelf> IDivisionOperators<Half,Half,Half> IDivisionOperators<TSelf,TSelf,TSelf> IEqualityOperators<Half,Half,Boolean> IEqualityOperators<TSelf,TOther,TResult> IEqualityOperators<TSelf,TSelf,Boolean> IExponentialFunctions<Half> IExponentialFunctions<TSelf> IFloatingPoint<Half> IFloatingPoint<TSelf> IFloatingPointConstants<Half> IFloatingPointConstants<TSelf> IFloatingPointIeee754<Half> IFloatingPointIeee754<TSelf> IHyperbolicFunctions<Half> IHyperbolicFunctions<TSelf> IIncrementOperators<Half> IIncrementOperators<TSelf> ILogarithmicFunctions<Half> ILogarithmicFunctions<TSelf> IMinMaxValue<Half> IModulusOperators<Half,Half,Half> IModulusOperators<TSelf,TSelf,TSelf> IMultiplicativeIdentity<Half,Half> IMultiplicativeIdentity<TSelf,TSelf> IMultiplyOperators<Half,Half,Half> IMultiplyOperators<TSelf,TSelf,TSelf> INumber<Half> INumber<TSelf> INumberBase<Half> INumberBase<TSelf> IPowerFunctions<Half> IPowerFunctions<TSelf> IRootFunctions<Half> IRootFunctions<TSelf> ISignedNumber<Half> ISignedNumber<TSelf> ISubtractionOperators<Half,Half,Half> ISubtractionOperators<TSelf,TSelf,TSelf> ITrigonometricFunctions<Half> ITrigonometricFunctions<TSelf> IUnaryNegationOperators<Half,Half> IUnaryNegationOperators<TSelf,TSelf> IUnaryPlusOperators<Half,Half> IUnaryPlusOperators<TSelf,TSelf> IUtf8SpanFormattable IUtf8SpanParsable<Half> IUtf8SpanParsable<TSelf>
注解
Half 值类型表示半精度的 16 位数字,其值范围为负 65,504 到正 65,504,以及正或负零、PositiveInfinity、NegativeInfinity,而不是数字(NaN)。
这是符合 IEEE 754 的 float16
类型。
属性
E |
获取数学常量 |
Epsilon |
表示大于零的最小正 Half 值。 |
MaxValue |
表示 Half的最大可能值。 |
MinValue |
表示 Half的最小可能值。 |
MultiplicativeIdentity |
获取当前类型的乘法标识。 |
NaN |
表示数字。 |
NegativeInfinity |
表示负无穷大。 |
NegativeOne |
获取类型 |
NegativeZero |
获取表示负 |
One |
获取类型 |
Pi |
获取数学常量 |
PositiveInfinity |
表示正无穷大。 |
Tau |
获取数学常量 |
Zero |
获取类型 |