Half Struct

Definition

An IEEE 754 compliant float16 type.

public value class Half : IComparable, IComparable<Half>, IEquatable<Half>, IFormattable
public struct Half : IComparable, IComparable<Half>, IEquatable<Half>, IFormattable
type Half = struct
    interface IFormattable
Public Structure Half
Implements IComparable, IComparable(Of Half), IEquatable(Of Half), IFormattable
Inheritance
Implements

Properties

Epsilon

Represents the smallest positive Half value that is greater than zero.

MaxValue

Represents the largest possible value of Half.

MinValue

Represents the smallest possible value of Half.

NaN

Represents not a number.

NegativeInfinity

Represents negative infinity.

PositiveInfinity

Represents positive infinity.

Methods

CompareTo(Half)

Compares this instance to a specified half-precision floating-point number and returns an integer that indicates whether the value of this instance is less than, equal to, or greater than the value of the specified half-precision floating-point number.

CompareTo(Object)

Compares this instance to a specified object and returns an integer that indicates whether the value of this instance is less than, equal to, or greater than the value of the specified object.

Equals(Half)

Compares this instance for equality with other.

Equals(Object)

Returns a value that indicates whether this instance is equal to the specified obj.

GetHashCode()

Returns the hash code for this instance.

IsFinite(Half)

Determines whether the specified value is finite (zero, subnormal, or normal).

IsInfinity(Half)

Returns a value indicating whether the specified number evaluates to positive infinity.

IsNaN(Half)

Determines whether the specified value is not a number.

IsNegative(Half)

Determines whether the specified value is negative.

IsNegativeInfinity(Half)

Determines whether the specified value is negative infinity.

IsNormal(Half)

Determines whether the specified value is normal.

IsPositiveInfinity(Half)

Determines whether the specified value is positive infinity.

IsSubnormal(Half)

Determines whether the specified value is subnormal.

Parse(ReadOnlySpan<Char>, NumberStyles, IFormatProvider)

Converts the string representation of a number in a specified style and culture-specific format to its single-precision floating-point number equivalent.

Parse(String)

Converts the string representation of a number to its half-precision floating-point number equivalent.

Parse(String, IFormatProvider)

Converts the string representation of a number in a specified culture-specific format to its single-precision floating-point number equivalent.

Parse(String, NumberStyles)

Converts the string representation of a number in a specified style to its single-precision floating-point number equivalent.

Parse(String, NumberStyles, IFormatProvider)

Converts the string representation of a number in a specified style and culture-specific format to its single-precision floating-point number equivalent.

ToString()

Converts the numeric value of this instance to its equivalent string representation.

ToString(IFormatProvider)

Converts the numeric value of this instance to its equivalent string representation using the specified culture-specific format information.

ToString(String)

Converts the numeric value of this instance to its equivalent string representation, using the specified format.

ToString(String, IFormatProvider)

Converts the numeric value of this instance to its equivalent string representation using the specified format and culture-specific format information.

TryFormat(Span<Char>, Int32, ReadOnlySpan<Char>, IFormatProvider)

Tries to format the value of the current Half instance into the provided span of characters.

TryParse(ReadOnlySpan<Char>, Half)

Converts the span representation of a number to its half-precision floating-point number equivalent. A return value indicates whether the conversion succeeded or failed.

TryParse(ReadOnlySpan<Char>, NumberStyles, IFormatProvider, Half)

Converts the span representation of a number to its half-precision floating-point number equivalent. A return value indicates whether the conversion succeeded or failed.

TryParse(String, Half)

Converts the string representation of a number to its half-precision floating-point number equivalent. A return value indicates whether the conversion succeeded or failed.

TryParse(String, NumberStyles, IFormatProvider, Half)

Converts the string representation of a number to its half-precision floating-point number equivalent. A return value indicates whether the conversion succeeded or failed.

Operators

Equality(Half, Half)

Returns a value that indicates whether two specified Half values are equal.

Explicit(Double to Half)

An explicit operator to convert a Double value to a Half.

Explicit(Half to Double)

An explicit operator to convert a Half value to a Double.

Explicit(Half to Single)

An explicit operator to convert a Half value to a Single.

Explicit(Single to Half)

An explicit operator to convert a Single value to a Half.

GreaterThan(Half, Half)

Returns a value that indicates whether a specified Half value is greater than another specified Half value.

GreaterThanOrEqual(Half, Half)

Returns a value that indicates whether left is greater than or equal to right.

Inequality(Half, Half)

Returns a value that indicates whether two specified Half values are not equal.

LessThan(Half, Half)

Returns a value that indicates whether a specified Half value is less than another specified Half value.

LessThanOrEqual(Half, Half)

Returns a value that indicates whether a specified Half value is less than or equal to another specified Half value.

Applies to