Table of Contents

Class XHalf

Extension methods and other bonus stuff for Half.

Inheritance
System.Object
XHalf
Namespace: Galaxon.Core.Numbers
Assembly: Galaxon.Core.dll
Syntax
public static class XHalf : object

Fields

MaxExp

The maximum binary exponent supported by the type.

Declaration
public const short MaxExp = null
Field Value
Type Description
System.Int16
| Improve this Doc View Source

MinExp

The minimum binary exponent supported by the type.

Declaration
public const short MinExp = null
Field Value
Type Description
System.Int16
| Improve this Doc View Source

NumExpBits

The number of bits in the exponent.

Declaration
public const byte NumExpBits = null
Field Value
Type Description
System.Byte
| Improve this Doc View Source

NumFracBits

The number of bits in the fraction.

Declaration
public const byte NumFracBits = null
Field Value
Type Description
System.Byte
| Improve this Doc View Source

Properties

MaxPosSubnormalValue

The maximum positive subnormal value.

Declaration
public static Half MaxPosSubnormalValue { get; }
Property Value
Type Description
Half
| Improve this Doc View Source

MinPosNormalValue

The minimum positive normal value.

Declaration
public static Half MinPosNormalValue { get; }
Property Value
Type Description
Half
| Improve this Doc View Source

Methods

Assemble(Byte, UInt16, UInt64)

Assemble a new Half from parts.

Declaration
public static Half Assemble(byte signBit, ushort expBits, ulong fracBits)
Parameters
Type Name Description
System.Byte signBit

The sign bit (1 or 0).

System.UInt16 expBits

The exponent bits.

System.UInt64 fracBits

The fraction bits.

Returns
Type Description
Half

The new Half.

| Improve this Doc View Source

Disassemble(Half)

Disassemble the Half into its bitwise components.

Declaration
public static (byte signBit, ushort expBits, ulong fracBits) Disassemble(this Half x)
Parameters
Type Name Description
Half x
Returns
Type Description
System.ValueTuple<System.Byte, System.UInt16, System.UInt64>
| Improve this Doc View Source

GetRandom()

Get a random Half.

Declaration
public static Half GetRandom()
Returns
Type Description
Half
| Improve this Doc View Source
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX | Galaxy logo by Freepik