FloatUtils Class
Utilities to facilitate bitwise manipulation of floating point numbers.
Namespace
RandN.Implementation
Base Types
  • object
FloatUtils
object

Syntax

public static class FloatUtils

Fields

NameField TypeConstant ValueSummary
MachineEpsilonDoubledouble2.220446049250313E-16
The machine epsilon value for double.
static
MachineEpsilonSinglefloat1.1920929E-07
The machine epsilon value for float.
static

Methods

NameReturn ValueSummary
DecrementMantissa(decimal)decimal
Decrements the mantissa of a decimal by one, wrapping by increasing the scale if necessary.
static
IntoFloatWithExponent(uint, int)float
Converts the given uint into a float with the given exponent.
static
IntoFloatWithExponent(ulong, int)double
Converts the given ulong into a double with the given exponent.
static
ToBits(double)ulong
Reinterprets the bits of num as a ulong.
static
ToBits(float)uint
Reinterprets the bits of num as a uint.
static
ToFloat(uint)float
Reinterprets bits as a float.
static
ToFloat(ulong)double
Reinterprets bits as a double.
static