STK::Arithmetic< Real > Struct Template Reference
[Arithmetic properties.]

Specialization for Real. More...

#include <STK_Real.h>

Inherits std::numeric_limits<Real>.

List of all members.

Static Public Member Functions

static Real NA () throw ()
static bool isNA (const Real &x) throw ()
static bool isInfinite (const Real &x) throw ()
static bool isFinite (const Real &x) throw ()

Static Public Attributes

static const bool has_quiet_NaN = false
static const bool hasNA = true


Detailed Description

template<>
struct STK::Arithmetic< Real >

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

Definition at line 65 of file STK_Real.h.


Member Function Documentation

static Real STK::Arithmetic< Real >::NA (  )  throw () [inline, static]

Adding a Non Avalaible (NA) special number using the quiet_NaN method.

Definition at line 74 of file STK_Real.h.

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

static bool STK::Arithmetic< Real >::isNA ( const Real x  )  throw () [inline, static]

Test if x is a Non Avalaible (NA) special number

Parameters:
x the Real to test.

Definition at line 83 of file STK_Real.h.

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

static bool STK::Arithmetic< Real >::isInfinite ( const Real x  )  throw () [inline, static]

Test if x is infinite.

Parameters:
x the Real to test.

Definition at line 89 of file STK_Real.h.

References STK::max().

00090   { return ( (x < -std::numeric_limits<Real>::max())
00091            ||(x > std::numeric_limits<Real>::max())
00092            );
00093   }

static bool STK::Arithmetic< Real >::isFinite ( const Real x  )  throw () [inline, static]

Test if x is finite.

Parameters:
x the Real to test.

Definition at line 98 of file STK_Real.h.

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

00099   { return (!isNA(x) && !isInfinite(x));}


Member Data Documentation

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

We are using the quiet_NaN representation for NA numbers.

Definition at line 69 of file STK_Real.h.

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

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

Definition at line 78 of file STK_Real.h.


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

Generated on Fri Sep 25 10:31:01 2009 for STK++ by  doxygen 1.5.8