STK++ 0.9.13
STK::Arithmetic< Real > Struct Reference

Specialization for Real. More...

#include <STK_Real.h>

Inheritance diagram for STK::Arithmetic< Real >:
Inheritance graph

Static Public Member Functions

static Real NA () throw ()
 
static bool isNA (Real const &x) throw ()
 Test if x is a Non Available (NA) special number.
 
static bool isInfinite (Real const &x) throw ()
 
static bool isFinite (Real const &x) throw ()
 

Static Public Attributes

static const bool hasNA = true
 True if the type has a representation for a "Not Available."

 
static const bool has_quiet_NaN = false
 We are using the quiet_NaN representation for NA numbers.
 

Detailed Description

Specialization for Real.

We are using the quiet_NaN() representation of the underlying Type for representing NA (not available) numbers.

Definition at line 59 of file STK_Real.h.

Member Function Documentation

◆ isFinite()

static bool STK::Arithmetic< Real >::isFinite ( Real const x)
throw (
)
inlinestatic
Returns
true if x is finite.
Parameters
xthe Real to test.

Definition at line 85 of file STK_Real.h.

85{ return (!isNA(x) && !isInfinite(x));}
static bool isNA(Real const &x)
Test if x is a Non Available (NA) special number.
Definition STK_Real.h:76
static bool isInfinite(Real const &x)
Definition STK_Real.h:80

References STK::Arithmetic< Type >::isInfinite(), and STK::Arithmetic< Type >::isNA().

◆ isInfinite()

static bool STK::Arithmetic< Real >::isInfinite ( Real const x)
throw (
)
inlinestatic
Returns
true if x is infinite.
Parameters
xthe Real to test.

Definition at line 80 of file STK_Real.h.

81 { return ( (x < -std::numeric_limits<Real>::max())||(x > std::numeric_limits<Real>::max()));}

◆ isNA()

static bool STK::Arithmetic< Real >::isNA ( Real const x)
throw (
)
inlinestatic

Test if x is a Non Available (NA) special number.

Parameters
xthe Integer number to test.

Definition at line 76 of file STK_Real.h.

76{ return !(x==x);}

◆ NA()

static Real STK::Arithmetic< Real >::NA ( )
throw (
)
inlinestatic
Returns
a Non Available (NA) special number using the quiet_NaN method.

Definition at line 70 of file STK_Real.h.

70{ return std::numeric_limits<Real>::quiet_NaN();}

Member Data Documentation

◆ has_quiet_NaN

const bool STK::Arithmetic< Real >::has_quiet_NaN = false
static

We are using the quiet_NaN representation for NA numbers.

Definition at line 72 of file STK_Real.h.

◆ hasNA

const bool STK::Arithmetic< Real >::hasNA = true
static

True if the type has a representation for a "Not Available."

Definition at line 68 of file STK_Real.h.


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