Table of Contents

Class XFloatingPoint

Extension methods for IFloatingPoint{T}.

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

Methods

Assemble<T>(Byte, UInt16, UInt64)

Assemble a new floating point value from parts.

Declaration
public static T Assemble<T>(byte signBit, ushort expBits, ulong fracBits)
    where T : IFloatingPoint<T>
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
T

The new floating point value.

Type Parameters
Name Description
T

A floating point type.

| Improve this Doc View Source

Disassemble<T>(T)

Disassemble the floating point value into its bitwise components.

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

GetMaxExp<T>()

Get the maximum exponent for the type.

Declaration
public static short GetMaxExp<T>()
    where T : IFloatingPoint<T>
Returns
Type Description
System.Int16
Type Parameters
Name Description
T
| Improve this Doc View Source

GetMinExp<T>()

Get the minimum exponent for the type.

Declaration
public static short GetMinExp<T>()
    where T : IFloatingPoint<T>
Returns
Type Description
System.Int16
Type Parameters
Name Description
T
| Improve this Doc View Source

GetMinPosNormalValue<T>()

Get the minimum positive normal value for the type.

Declaration
public static T GetMinPosNormalValue<T>()
    where T : IFloatingPoint<T>
Returns
Type Description
T
Type Parameters
Name Description
T
| Improve this Doc View Source

GetNumExpBits<T>()

Get the number of exponent bits.

Declaration
public static byte GetNumExpBits<T>()
    where T : IFloatingPoint<T>
Returns
Type Description
System.Byte
Type Parameters
Name Description
T
| Improve this Doc View Source

GetNumFracBits<T>()

Get the number of fraction bits.

Declaration
public static byte GetNumFracBits<T>()
    where T : IFloatingPoint<T>
Returns
Type Description
System.Byte
Type Parameters
Name Description
T
| Improve this Doc View Source
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX | Galaxy logo by Freepik