< Home

< Table of Contents

REFERENCE MANUAL

HPS.Float Class Reference

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

Static Public Member Functions

static float C2F (byte x)
 
static bool Equals (float a, float b, int tolerance)
 Checks two floats for equality within a specified tolerance. More...
 
static bool Equals (float a, float b)
 Checks two floats for equality within a specified tolerance. More...
 
static bool Equals (double a, double b, int tolerance)
 Checks two floats for equality within a specified tolerance. More...
 
static bool Equals (double a, double b)
 Checks two floats for equality within a specified tolerance. More...
 
static UInt32 extract_sign_bit (float a)
 
static UInt32 extract_sign_bit (double a)
 
static UInt32 extract_uint32_t (float a)
 
static bool IsAbnormal (float a)
 See if the value is not "normal" (infinite or NaN) More...
 
static bool IsAbnormal (double a)
 See if the value is not "normal" (infinite or NaN) More...
 
static bool IsInfinite (float a)
 See if the value is either infinity More...
 
static bool IsInfinite (double a)
 See if the value is either infinity More...
 
static bool IsNAN (float a)
 See if the value is Not-A-Number More...
 
static bool IsNAN (double a)
 See if the value is Not-A-Number More...
 
static bool match (float a, float b)
 
static bool match (double a, double b)
 
static byte unit_to_byte (float a)
 
static byte unit_to_byte_scaled (float a, byte mix)
 

Detailed Description

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

Member Function Documentation

static bool HPS.Float.Equals ( float  a,
float  b,
int  tolerance 
)
static

Checks two floats for equality within a specified tolerance.

The tolerance is specified in float increments that scale with the floats themselves.

static bool HPS.Float.Equals ( float  a,
float  b 
)
static

Checks two floats for equality within a specified tolerance.

The tolerance is specified in float increments that scale with the floats themselves.

static bool HPS.Float.Equals ( double  a,
double  b,
int  tolerance 
)
static

Checks two floats for equality within a specified tolerance.

The tolerance is specified in float increments that scale with the floats themselves.

static bool HPS.Float.Equals ( double  a,
double  b 
)
static

Checks two floats for equality within a specified tolerance.

The tolerance is specified in float increments that scale with the floats themselves.

static bool HPS.Float.IsAbnormal ( float  a)
static

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

static bool HPS.Float.IsAbnormal ( double  a)
static

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

static bool HPS.Float.IsInfinite ( float  a)
static

See if the value is either infinity

static bool HPS.Float.IsInfinite ( double  a)
static

See if the value is either infinity

static bool HPS.Float.IsNAN ( float  a)
static

See if the value is Not-A-Number

static bool HPS.Float.IsNAN ( double  a)
static

See if the value is Not-A-Number


The documentation for this class was generated from the following file: