nuget server logo nuget api documents
↑

API Docs / Microsoft.VisualBasic.Math.Core / Half

Half

Full name Microsoft.VisualBasic.Math.Numerics.Half Assembly Microsoft.VisualBasic.Math.Core Members 90

Represents a half-precision floating point number.

00 Remarks

Note: Half is not fast enought and precision is also very bad, so is should not be used for matemathical computation (use Single instead). The main advantage of Half type is lower memory cost: two bytes per number. Half is typically used in graphical applications.

Note: All functions, where is used conversion half->float/float->half, are approx. ten times slower than float->double/double->float, i.e. ~3ns on 2GHz CPU.

References:

01 Syntax

Microsoft.VisualBasic.Math.Numerics.Half

02 Methods

NameOverloadsSummary
.ctor 7 Initializes a new instance of System.Half to the value of the specified decimal number.
Negate 1 Returns the result of multiplying the specified System.Half value by negative one.
Add 1 Adds two specified System.Half values.
Subtract 1 Subtracts one specified System.Half value from another.
Multiply 1 Multiplies two specified System.Half values.
Divide 1 Divides two specified System.Half values.
op_UnaryPlus 1 Returns the value of the System.Half operand (the sign of the operand is unchanged).
op_UnaryNegation 1 Negates the value of the specified System.Half operand.
op_Addition 1 Adds two specified System.Half values.
op_Subtraction 1 Subtracts two specified System.Half values.
op_Multiply 1 Multiplies two specified System.Half values.
op_Division 1 Divides two specified System.Half values.
op_Equality 1 Returns a value indicating whether two instances of System.Half are equal.
op_Inequality 1 Returns a value indicating whether two instances of System.Half are not equal.
op_LessThan 1 Returns a value indicating whether a specified System.Half is less than another specified System.Half.
op_GreaterThan 1 Returns a value indicating whether a specified System.Half is greater than another specified System.Half.
op_LessThanOrEqual 1 Returns a value indicating whether a specified System.Half is less than or equal to another specified System.Half.
op_GreaterThanOrEqual 1 Returns a value indicating whether a specified System.Half is greater than or equal to another specified System.Half.
op_Implicit 11 Converts a System.Half to a double-precision floating-point number.
op_Explicit 13 Converts a System.Half to an 8-bit unsigned integer.
CompareTo 2 Compares this instance to a specified System.Half object.
Equals 2 Returns a value indicating whether this instance and a specified System.Half object represent the same value.
GetHashCode 1 Returns the hash code for this instance.
GetTypeCode 1 Returns the System.TypeCode for value type System.Half.
GetBytes 1 Returns the specified half-precision floating point value as an array of bytes.
GetBits 1 Converts the value of a specified instance of System.Half to its equivalent binary representation.
ToHalf 2 Returns a half-precision floating point number converted from two bytes at a specified position in a byte array.
Sign 1 Returns a value indicating the sign of a half-precision floating-point number.
Abs 1 Returns the absolute value of a half-precision floating-point number.
Max 1 Returns the larger of two half-precision floating-point numbers.
Min 1 Returns the smaller of two half-precision floating-point numbers.
IsNaN 1 Returns a value indicating whether the specified number evaluates to not a number (System.Half.NaN).
IsInfinity 1 Returns a value indicating whether the specified number evaluates to negative or positive infinity.
IsNegativeInfinity 1 Returns a value indicating whether the specified number evaluates to negative infinity.
IsPositiveInfinity 1 Returns a value indicating whether the specified number evaluates to positive infinity.
Parse 4 Converts the string representation of a number to its System.Half equivalent using the specified style and culture-specific format.
TryParse 2 Converts the string representation of a number to its System.Half equivalent.
ToString 4 Converts the numeric value of this instance to its equivalent string representation.
op_Exponent 1

03 Fields

NameOverloadsSummary
Value 1 Internal representation of the half-precision floating-point number.
Epsilon 2 Represents the smallest positive System.Half value greater than zero.
MaxValue 2 Represents the largest possible value of System.Half.
MinValue 2 Represents the smallest possible value of System.Half.
NaN 2 Represents not a number (NaN).
NegativeInfinity 2 Represents negative infinity.
PositiveInfinity 2 Represents positive infinity.

04 Members

method .ctor overload 5 #
#ctor(Single)

Initializes a new instance of System.Half to the value of the specified single-precision floating-point number.

Parameters
NameTypeDescription
valueSingle

The value to represent as a System.Half.

method .ctor overload 3 #
#ctor(Int32)

Initializes a new instance of System.Half to the value of the specified 32-bit signed integer.

Parameters
NameTypeDescription
valueInt32

The value to represent as a System.Half.

method .ctor overload 4 #
#ctor(Int64)

Initializes a new instance of System.Half to the value of the specified 64-bit signed integer.

Parameters
NameTypeDescription
valueInt64

The value to represent as a System.Half.

method .ctor overload 2 #
#ctor(Double)

Initializes a new instance of System.Half to the value of the specified double-precision floating-point number.

Parameters
NameTypeDescription
valueDouble

The value to represent as a System.Half.

method .ctor #
#ctor(Decimal)

Initializes a new instance of System.Half to the value of the specified decimal number.

Parameters
NameTypeDescription
valueDecimal

The value to represent as a System.Half.

method .ctor overload 6 #
#ctor(UInt32)

Initializes a new instance of System.Half to the value of the specified 32-bit unsigned integer.

Parameters
NameTypeDescription
valueUInt32

The value to represent as a System.Half.

method .ctor overload 7 #
#ctor(UInt64)

Initializes a new instance of System.Half to the value of the specified 64-bit unsigned integer.

Parameters
NameTypeDescription
valueUInt64

The value to represent as a System.Half.

method Negate #
Negate(Half)

Returns the result of multiplying the specified System.Half value by negative one.

Parameters
NameTypeDescription
halfHalf

A System.Half.

Returns

A System.Half with the value of half, but the opposite sign. -or- Zero, if half is zero.

method Add #
Add(Half, Half)

Adds two specified System.Half values.

Parameters
NameTypeDescription
half1Half

A System.Half.

half2Half

A System.Half.

Returns

A System.Half value that is the sum of half1 and half2.

method Subtract #
Subtract(Half, Half)

Subtracts one specified System.Half value from another.

Parameters
NameTypeDescription
half1Half

A System.Half (the minuend).

half2Half

A System.Half (the subtrahend).

Returns

The System.Half result of subtracting half2 from half1.

method Multiply #
Multiply(Half, Half)

Multiplies two specified System.Half values.

Parameters
NameTypeDescription
half1Half

A System.Half (the multiplicand).

half2Half

A System.Half (the multiplier).

Returns

A System.Half that is the result of multiplying half1 and half2.

method Divide #
Divide(Half, Half)

Divides two specified System.Half values.

Parameters
NameTypeDescription
half1Half

A System.Half (the dividend).

half2Half

A System.Half (the divisor).

Returns

The System.Half that is the result of dividing half1 by half2.

method op_UnaryPlus #
op_UnaryPlus(Half)

Returns the value of the System.Half operand (the sign of the operand is unchanged).

Parameters
NameTypeDescription
halfHalf

The System.Half operand.

Returns

The value of the operand, half.

method op_UnaryNegation #
op_UnaryNegation(Half)

Negates the value of the specified System.Half operand.

Parameters
NameTypeDescription
halfHalf

The System.Half operand.

Returns

The result of half multiplied by negative one (-1).

method op_Addition #
op_Addition(Half, Half)

Adds two specified System.Half values.

Parameters
NameTypeDescription
half1Half

A System.Half.

half2Half

A System.Half.

Returns

The System.Half result of adding half1 and half2.

method op_Subtraction #
op_Subtraction(Half, Half)

Subtracts two specified System.Half values.

Parameters
NameTypeDescription
half1Half

A System.Half.

half2Half

A System.Half.

Returns

The System.Half result of subtracting half1 and half2.

method op_Multiply #
op_Multiply(Half, Half)

Multiplies two specified System.Half values.

Parameters
NameTypeDescription
half1Half

A System.Half.

half2Half

A System.Half.

Returns

The System.Half result of multiplying half1 by half2.

method op_Division #
op_Division(Half, Half)

Divides two specified System.Half values.

Parameters
NameTypeDescription
half1Half

A System.Half (the dividend).

half2Half

A System.Half (the divisor).

Returns

The System.Half result of half1 by half2.

method op_Equality #
op_Equality(Half, Half)

Returns a value indicating whether two instances of System.Half are equal.

Parameters
NameTypeDescription
half1Half

A System.Half.

half2Half

A System.Half.

Returns

true if half1 and half2 are equal; otherwise, false.

method op_Inequality #
op_Inequality(Half, Half)

Returns a value indicating whether two instances of System.Half are not equal.

Parameters
NameTypeDescription
half1Half

A System.Half.

half2Half

A System.Half.

Returns

true if half1 and half2 are not equal; otherwise, false.

method op_LessThan #
op_LessThan(Half, Half)

Returns a value indicating whether a specified System.Half is less than another specified System.Half.

Parameters
NameTypeDescription
half1Half

A System.Half.

half2Half

A System.Half.

Returns

true if half1 is less than half1; otherwise, false.

method op_GreaterThan #
op_GreaterThan(Half, Half)

Returns a value indicating whether a specified System.Half is greater than another specified System.Half.

Parameters
NameTypeDescription
half1Half

A System.Half.

half2Half

A System.Half.

Returns

true if half1 is greater than half2; otherwise, false.

method op_LessThanOrEqual #
op_LessThanOrEqual(Half, Half)

Returns a value indicating whether a specified System.Half is less than or equal to another specified System.Half.

Parameters
NameTypeDescription
half1Half

A System.Half.

half2Half

A System.Half.

Returns

true if half1 is less than or equal to half2; otherwise, false.

method op_GreaterThanOrEqual #
op_GreaterThanOrEqual(Half, Half)

Returns a value indicating whether a specified System.Half is greater than or equal to another specified System.Half.

Parameters
NameTypeDescription
half1Half

A System.Half.

half2Half

A System.Half.

Returns

true if half1 is greater than or equal to half2; otherwise, false.

method op_Implicit overload 3 #
op_Implicit(Byte)

Converts an 8-bit unsigned integer to a System.Half.

Parameters
NameTypeDescription
valueByte

An 8-bit unsigned integer.

Returns

A System.Half that represents the converted 8-bit unsigned integer.

method op_Implicit overload 5 #
op_Implicit(Int16)

Converts a 16-bit signed integer to a System.Half.

Parameters
NameTypeDescription
valueInt16

A 16-bit signed integer.

Returns

A System.Half that represents the converted 16-bit signed integer.

method op_Implicit overload 4 #
op_Implicit(Char)

Converts a Unicode character to a System.Half.

Parameters
NameTypeDescription
valueChar

A Unicode character.

Returns

A System.Half that represents the converted Unicode character.

method op_Implicit overload 6 #
op_Implicit(Int32)

Converts a 32-bit signed integer to a System.Half.

Parameters
NameTypeDescription
valueInt32

A 32-bit signed integer.

Returns

A System.Half that represents the converted 32-bit signed integer.

method op_Implicit overload 7 #
op_Implicit(Int64)

Converts a 64-bit signed integer to a System.Half.

Parameters
NameTypeDescription
valueInt64

A 64-bit signed integer.

Returns

A System.Half that represents the converted 64-bit signed integer.

method op_Implicit overload 2 #
op_Implicit(Half)

Converts a System.Half to a single-precision floating-point number.

Parameters
NameTypeDescription
valueHalf

A System.Half to convert.

Returns

A single-precision floating-point number that represents the converted System.Half.

method op_Implicit #
op_Implicit(Half)

Converts a System.Half to a double-precision floating-point number.

Parameters
NameTypeDescription
valueHalf

A System.Half to convert.

Returns

A double-precision floating-point number that represents the converted System.Half.

method op_Implicit overload 8 #
op_Implicit(SByte)

Converts an 8-bit signed integer to a System.Half.

Parameters
NameTypeDescription
valueSByte

An 8-bit signed integer.

Returns

A System.Half that represents the converted 8-bit signed integer.

method op_Implicit overload 9 #
op_Implicit(UInt16)

Converts a 16-bit unsigned integer to a System.Half.

Parameters
NameTypeDescription
valueUInt16

A 16-bit unsigned integer.

Returns

A System.Half that represents the converted 16-bit unsigned integer.

method op_Implicit overload 10 #
op_Implicit(UInt32)

Converts a 32-bit unsigned integer to a System.Half.

Parameters
NameTypeDescription
valueUInt32

A 32-bit unsigned integer.

Returns

A System.Half that represents the converted 32-bit unsigned integer.

method op_Implicit overload 11 #
op_Implicit(UInt64)

Converts a 64-bit unsigned integer to a System.Half.

Parameters
NameTypeDescription
valueUInt64

A 64-bit unsigned integer.

Returns

A System.Half that represents the converted 64-bit unsigned integer.

method op_Explicit overload 13 #
op_Explicit(Single)

Converts a single-precision floating-point number to a System.Half.

Parameters
NameTypeDescription
valueSingle

A single-precision floating-point number.

Returns

A System.Half that represents the converted single-precision floating point number.

method op_Explicit overload 12 #
op_Explicit(Double)

Converts a double-precision floating-point number to a System.Half.

Parameters
NameTypeDescription
valueDouble

A double-precision floating-point number.

Returns

A System.Half that represents the converted double-precision floating point number.

method op_Explicit overload 11 #
op_Explicit(Decimal)

Converts a decimal number to a System.Half.

Parameters
NameTypeDescription
valueDecimal

decimal number

Returns

A System.Half that represents the converted decimal number.

method op_Explicit #
op_Explicit(Half)

Converts a System.Half to an 8-bit unsigned integer.

Parameters
NameTypeDescription
valueHalf

A System.Half to convert.

Returns

An 8-bit unsigned integer that represents the converted System.Half.

method op_Explicit overload 2 #
op_Explicit(Half)

Converts a System.Half to a Unicode character.

Parameters
NameTypeDescription
valueHalf

A System.Half to convert.

Returns

A Unicode character that represents the converted System.Half.

method op_Explicit overload 4 #
op_Explicit(Half)

Converts a System.Half to a 16-bit signed integer.

Parameters
NameTypeDescription
valueHalf

A System.Half to convert.

Returns

A 16-bit signed integer that represents the converted System.Half.

method op_Explicit overload 5 #
op_Explicit(Half)

Converts a System.Half to a 32-bit signed integer.

Parameters
NameTypeDescription
valueHalf

A System.Half to convert.

Returns

A 32-bit signed integer that represents the converted System.Half.

method op_Explicit overload 6 #
op_Explicit(Half)

Converts a System.Half to a 64-bit signed integer.

Parameters
NameTypeDescription
valueHalf

A System.Half to convert.

Returns

A 64-bit signed integer that represents the converted System.Half.

method op_Explicit overload 3 #
op_Explicit(Half)

Converts a System.Half to a decimal number.

Parameters
NameTypeDescription
valueHalf

A System.Half to convert.

Returns

A decimal number that represents the converted System.Half.

method op_Explicit overload 7 #
op_Explicit(Half)

Converts a System.Half to an 8-bit signed integer.

Parameters
NameTypeDescription
valueHalf

A System.Half to convert.

Returns

An 8-bit signed integer that represents the converted System.Half.

method op_Explicit overload 8 #
op_Explicit(Half)

Converts a System.Half to a 16-bit unsigned integer.

Parameters
NameTypeDescription
valueHalf

A System.Half to convert.

Returns

A 16-bit unsigned integer that represents the converted System.Half.

method op_Explicit overload 9 #
op_Explicit(Half)

Converts a System.Half to a 32-bit unsigned integer.

Parameters
NameTypeDescription
valueHalf

A System.Half to convert.

Returns

A 32-bit unsigned integer that represents the converted System.Half.

method op_Explicit overload 10 #
op_Explicit(Half)

Converts a System.Half to a 64-bit unsigned integer.

Parameters
NameTypeDescription
valueHalf

A System.Half to convert.

Returns

A 64-bit unsigned integer that represents the converted System.Half.

method CompareTo #
CompareTo(Half)

Compares this instance to a specified System.Half object.

Parameters
NameTypeDescription
otherHalf

A System.Half object.

Returns

A signed number indicating the relative values of this instance and value. Return Value Meaning Less than zero This instance is less than value. Zero This instance is equal to value. Greater than zero This instance is greater than value.

method CompareTo overload 2 #
CompareTo(Object)

Compares this instance to a specified System.Object.

Parameters
NameTypeDescription
objObject

An System.Object or null.

Returns

A signed number indicating the relative values of this instance and value. Return Value Meaning Less than zero This instance is less than value. Zero This instance is equal to value. Greater than zero This instance is greater than value. -or- value is null.

method Equals #
Equals(Half)

Returns a value indicating whether this instance and a specified System.Half object represent the same value.

Parameters
NameTypeDescription
otherHalf

A System.Half object to compare to this instance.

Returns

true if value is equal to this instance; otherwise, false.

method Equals overload 2 #
Equals(Object)

Returns a value indicating whether this instance and a specified System.Object represent the same type and value.

Parameters
NameTypeDescription
objObject

An System.Object.

Returns

true if value is a System.Half and equal to this instance; otherwise, false.

method GetHashCode #
GetHashCode

Returns the hash code for this instance.

Returns

A 32-bit signed integer hash code.

method GetTypeCode #
GetTypeCode

Returns the System.TypeCode for value type System.Half.

Returns

The enumerated constant (TypeCode)255.

method GetBytes #
GetBytes(Half)

Returns the specified half-precision floating point value as an array of bytes.

Parameters
NameTypeDescription
valueHalf

The number to convert.

Returns

An array of bytes with length 2.

method GetBits #
GetBits(Half)

Converts the value of a specified instance of System.Half to its equivalent binary representation.

Parameters
NameTypeDescription
valueHalf

A System.Half value.

Returns

A 16-bit unsigned integer that contain the binary representation of value.

method ToHalf #
ToHalf(Byte(), Int32)

Returns a half-precision floating point number converted from two bytes at a specified position in a byte array.

Parameters
NameTypeDescription
valueByte()

An array of bytes.

startIndexInt32

The starting position within value.

Returns

A half-precision floating point number formed by two bytes beginning at startIndex.

method ToHalf overload 2 #
ToHalf(UInt16)

Returns a half-precision floating point number converted from its binary representation.

Parameters
NameTypeDescription
bitsUInt16

Binary representation of System.Half value

Returns

A half-precision floating point number formed by its binary representation.

method Sign #
Sign(Half)

Returns a value indicating the sign of a half-precision floating-point number.

Parameters
NameTypeDescription
valueHalf

A signed number.

Returns

A number indicating the sign of value. Number Description -1 value is less than zero. 0 value is equal to zero. 1 value is greater than zero.

method Abs #
Abs(Half)

Returns the absolute value of a half-precision floating-point number.

Parameters
NameTypeDescription
valueHalf

A number in the range System.Half.MinValue ≤ value ≤ System.Half.MaxValue.

Returns

A half-precision floating-point number, x, such that 0 ≤ x ≤System.Half.MaxValue.

method Max #
Max(Half, Half)

Returns the larger of two half-precision floating-point numbers.

Parameters
NameTypeDescription
value1Half

The first of two half-precision floating-point numbers to compare.

value2Half

The second of two half-precision floating-point numbers to compare.

Returns

Parameter value1 or value2, whichever is larger. If value1, or value2, or both val1 and value2 are equal to System.Half.NaN, System.Half.NaN is returned.

method Min #
Min(Half, Half)

Returns the smaller of two half-precision floating-point numbers.

Parameters
NameTypeDescription
value1Half

The first of two half-precision floating-point numbers to compare.

value2Half

The second of two half-precision floating-point numbers to compare.

Returns

Parameter value1 or value2, whichever is smaller. If value1, or value2, or both val1 and value2 are equal to System.Half.NaN, System.Half.NaN is returned.

method IsNaN #
IsNaN(Half)

Returns a value indicating whether the specified number evaluates to not a number (System.Half.NaN).

Parameters
NameTypeDescription
halfHalf

A half-precision floating-point number.

Returns

true if value evaluates to not a number (System.Half.NaN); otherwise, false.

method IsInfinity #
IsInfinity(Half)

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

Parameters
NameTypeDescription
halfHalf

A half-precision floating-point number.

Returns

true if half evaluates to System.Half.PositiveInfinity or System.Half.NegativeInfinity; otherwise, false.

method IsNegativeInfinity #
IsNegativeInfinity(Half)

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

Parameters
NameTypeDescription
halfHalf

A half-precision floating-point number.

Returns

true if half evaluates to System.Half.NegativeInfinity; otherwise, false.

method IsPositiveInfinity #
IsPositiveInfinity(Half)

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

Parameters
NameTypeDescription
halfHalf

A half-precision floating-point number.

Returns

true if half evaluates to System.Half.PositiveInfinity; otherwise, false.

method Parse overload 4 #
Parse(String)

Converts the string representation of a number to its System.Half equivalent.

Parameters
NameTypeDescription
valueString

The string representation of the number to convert.

Returns

The System.Half number equivalent to the number contained in value.

method Parse overload 3 #
Parse(String, IFormatProvider)

Converts the string representation of a number to its System.Half equivalent using the specified culture-specific format information.

Parameters
NameTypeDescription
valueString

The string representation of the number to convert.

providerIFormatProvider

An System.IFormatProvider that supplies culture-specific parsing information about value.

Returns

The System.Half number equivalent to the number contained in s as specified by provider.

method Parse overload 2 #
Parse(String, NumberStyles)

Converts the string representation of a number in a specified style to its System.Half equivalent.

Parameters
NameTypeDescription
valueString

The string representation of the number to convert.

styleNumberStyles

A bitwise combination of System.Globalization.NumberStyles values that indicates the style elements that can be present in value. A typical value to specify is System.Globalization.NumberStyles.Number.

Returns

The System.Half number equivalent to the number contained in s as specified by style.

method Parse #
Parse(String, NumberStyles, IFormatProvider)

Converts the string representation of a number to its System.Half equivalent using the specified style and culture-specific format.

Parameters
NameTypeDescription
valueString

The string representation of the number to convert.

styleNumberStyles

A bitwise combination of System.Globalization.NumberStyles values that indicates the style elements that can be present in value. A typical value to specify is System.Globalization.NumberStyles.Number.

providerIFormatProvider

An System.IFormatProvider object that supplies culture-specific information about the format of value.

Returns

The System.Half number equivalent to the number contained in s as specified by style and provider.

method TryParse #
TryParse(String, Half)

Converts the string representation of a number to its System.Half equivalent. A return value indicates whether the conversion succeeded or failed.

Parameters
NameTypeDescription
valueString

The string representation of the number to convert.

resultHalf

When this method returns, contains the System.Half number that is equivalent to the numeric value contained in value, if the conversion succeeded, or is zero if the conversion failed. The conversion fails if the s parameter is null, is not a number in a valid format, or represents a number less than System.Half.MinValue or greater than System.Half.MaxValue. This parameter is passed uninitialized.

Returns

true if s was converted successfully; otherwise, false.

method TryParse overload 2 #
TryParse(String, NumberStyles, IFormatProvider, Half)

Converts the string representation of a number to its System.Half equivalent using the specified style and culture-specific format. A return value indicates whether the conversion succeeded or failed.

Parameters
NameTypeDescription
valueString

The string representation of the number to convert.

styleNumberStyles

A bitwise combination of System.Globalization.NumberStyles values that indicates the permitted format of value. A typical value to specify is System.Globalization.NumberStyles.Number.

providerIFormatProvider

An System.IFormatProvider object that supplies culture-specific parsing information about value.

resultHalf

When this method returns, contains the System.Half number that is equivalent to the numeric value contained in value, if the conversion succeeded, or is zero if the conversion failed. The conversion fails if the s parameter is null, is not in a format compliant with style, or represents a number less than System.Half.MinValue or greater than System.Half.MaxValue. This parameter is passed uninitialized.

Returns

true if s was converted successfully; otherwise, false.

method ToString #
ToString

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

Returns

A string that represents the value of this instance.

method ToString overload 2 #
ToString(IFormatProvider)

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

Parameters
NameTypeDescription
formatProviderIFormatProvider

An System.IFormatProvider that supplies culture-specific formatting information.

Returns

The string representation of the value of this instance as specified by provider.

method ToString overload 4 #
ToString(String)

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

Parameters
NameTypeDescription
formatString

A numeric format string.

Returns

The string representation of the value of this instance as specified by format.

method ToString overload 3 #
ToString(String, IFormatProvider)

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

Parameters
NameTypeDescription
formatString

A numeric format string.

formatProviderIFormatProvider

An System.IFormatProvider that supplies culture-specific formatting information.

Returns

The string representation of the value of this instance as specified by format and provider.

field Value #
Value

Internal representation of the half-precision floating-point number.

field Epsilon #
Epsilon

Represents the smallest positive System.Half value greater than zero. This field is constant.

field MaxValue #
MaxValue

Represents the largest possible value of System.Half. This field is constant.

field MinValue #
MinValue

Represents the smallest possible value of System.Half. This field is constant.

field NaN #
NaN

Represents not a number (NaN). This field is constant.

field NegativeInfinity #
NegativeInfinity

Represents negative infinity. This field is constant.

field PositiveInfinity #
PositiveInfinity

Represents positive infinity. This field is constant.

field Epsilon overload 2 #
Epsilon
field MaxValue overload 2 #
MaxValue
field MinValue overload 2 #
MinValue
field NaN overload 2 #
NaN
field NegativeInfinity overload 2 #
NegativeInfinity
field PositiveInfinity overload 2 #
PositiveInfinity
method op_Exponent #
op_Exponent(Half, Single)