tOpenSine< NumType, nTerms > Class Template Reference

Computes the sine function using the expansion into the Taylor series at pi/2. More...

#include <opensine.h>

List of all members.

Static Public Member Functions

static int compute (const NumType &xLeft, const NumType &xRight, NumType &yLeft, NumType &yRight)
 Computes the sine function in the open interval arithmetic.

Static Private Member Functions

static void computeTaylorTerms (const NumType &x, NumType *lower_x2k, NumType *upper_x2k, int n)
 Computes the provided number of terms in the expansion of sin(pi+x) in the Taylor series at pi.
static NumType lowerBoundTaylor (const NumType &x)
 Returns a lower bound for the sine function.
static NumType upperBoundTaylor (const NumType &x)
 Returns an upper bound for the sine function.
static int shifted1pi (const NumType &xLeft, const NumType &xRight, NumType &yLeft, NumType &yRight)
 Computes the sine function in the open interval arithmetic with the arguments shifted so that xLeft is in [0,pi].
static int shifted2pi (const NumType &xLeft, const NumType &xRight, NumType &yLeft, NumType &yRight)
 Computes the sine function in the open interval arithmetic with the arguments shifted so that xLeft is in [0,2pi].


Detailed Description

template<class NumType, int nTerms>
class tOpenSine< NumType, nTerms >

Computes the sine function using the expansion into the Taylor series at pi/2.

Definition at line 51 of file opensine.h.


Member Function Documentation

template<class NumType, int nTerms>
int tOpenSine< NumType, nTerms >::compute ( const NumType &  xLeft,
const NumType &  xRight,
NumType &  yLeft,
NumType &  yRight 
) [inline, static]

Computes the sine function in the open interval arithmetic.

Definition at line 202 of file opensine.h.

References tOpenSine< NumType, nTerms >::shifted2pi().

template<class NumType, int nTerms>
void tOpenSine< NumType, nTerms >::computeTaylorTerms ( const NumType &  x,
NumType *  lower_x2k,
NumType *  upper_x2k,
int  n 
) [inline, static, private]

Computes the provided number of terms in the expansion of sin(pi+x) in the Taylor series at pi.

Definition at line 88 of file opensine.h.

Referenced by tOpenSine< NumType, nTerms >::lowerBoundTaylor(), and tOpenSine< NumType, nTerms >::upperBoundTaylor().

template<class NumType, int nTerms>
NumType tOpenSine< NumType, nTerms >::lowerBoundTaylor ( const NumType &  x  )  [inline, static, private]

Returns a lower bound for the sine function.

The argument must be in the interval (0,pi).

Definition at line 139 of file opensine.h.

References tOpenSine< NumType, nTerms >::computeTaylorTerms().

Referenced by tOpenSine< NumType, nTerms >::shifted1pi().

template<class NumType, int nTerms>
NumType tOpenSine< NumType, nTerms >::upperBoundTaylor ( const NumType &  x  )  [inline, static, private]

Returns an upper bound for the sine function.

The argument must be in the interval (0,pi).

Definition at line 169 of file opensine.h.

References tOpenSine< NumType, nTerms >::computeTaylorTerms().

Referenced by tOpenSine< NumType, nTerms >::shifted1pi().

template<class NumType, int nTerms>
int tOpenSine< NumType, nTerms >::shifted1pi ( const NumType &  xLeft,
const NumType &  xRight,
NumType &  yLeft,
NumType &  yRight 
) [inline, static, private]

Computes the sine function in the open interval arithmetic with the arguments shifted so that xLeft is in [0,pi].

Definition at line 258 of file opensine.h.

References tOpenSine< NumType, nTerms >::lowerBoundTaylor(), and tOpenSine< NumType, nTerms >::upperBoundTaylor().

Referenced by tOpenSine< NumType, nTerms >::shifted2pi().

template<class NumType, int nTerms>
int tOpenSine< NumType, nTerms >::shifted2pi ( const NumType &  xLeft,
const NumType &  xRight,
NumType &  yLeft,
NumType &  yRight 
) [inline, static, private]

Computes the sine function in the open interval arithmetic with the arguments shifted so that xLeft is in [0,2pi].

Definition at line 402 of file opensine.h.

References tOpenSine< NumType, nTerms >::shifted1pi().

Referenced by tOpenSine< NumType, nTerms >::compute().


The documentation for this class was generated from the following file:
Generated on Mon Apr 12 15:09:57 2010 for The Finite Resolution Dynamics Software by  doxygen 1.5.3