Float

class HPS.Float : public IDisposable

The Float class is a concept class that exposes a number of useful utilities for working with floating point numbers.

Public Functions

void Dispose ()
override bool Equals (Object obj)
Float (HPS.Float in_that)
override int GetHashCode ()

Public Static Functions

float C2F (byte x)
bool Equals (double a, double b)
bool Equals (double a, double b, int tolerance)
bool Equals (float a, float b)

Checks two floats for equality within a specified tolerance. The tolerance is specified in float increments that scale with the floats themselves.

bool Equals (float a, float b, int tolerance)

Checks two floats for equality within a specified tolerance. The tolerance is specified in float increments that scale with the floats themselves.

UInt32 extract_sign_bit (double a)
UInt32 extract_sign_bit (float a)
UInt32 extract_uint32_t (float a)
bool IsAbnormal (double a)
bool IsAbnormal (float a)

See if the value is not “normal” (infinite or NaN)

bool IsInfinite (double a)
bool IsInfinite (float a)

See if the value is either infinity

bool IsNAN (double a)
bool IsNAN (float a)

See if the value is Not-A-Number

bool match (double a, double b)
bool match (float a, float b)
bool operator!= (HPS.Float a, HPS.Float b)
bool operator== (HPS.Float a, HPS.Float b)
byte unit_to_byte (float a)
byte unit_to_byte_scaled (float a, byte mix)