クラス sc_dt::scfx_ieee_double

#include <scfx_ieee.h>

すべてのメンバ一覧

Public メソッド

 scfx_ieee_double ()
 scfx_ieee_double (double)
 scfx_ieee_double (const scfx_ieee_double &)
scfx_ieee_doubleoperator= (double)
scfx_ieee_doubleoperator= (const scfx_ieee_double &)
 operator double () const
unsigned int negative () const
void negative (unsigned int)
int exponent () const
void exponent (int)
unsigned int mantissa0 () const
void mantissa0 (unsigned int)
unsigned int mantissa1 () const
void mantissa1 (unsigned int)
bool is_zero () const
bool is_subnormal () const
bool is_normal () const
bool is_inf () const
bool is_nan () const
void set_inf ()
void set_nan ()
int msb () const
int lsb () const

Static Public メソッド

static const scfx_ieee_double nan ()
static const scfx_ieee_double inf (int)

Private 変数

ieee_double m_id


説明

scfx_ieee.h105 行で定義されています。


コンストラクタとデストラクタ

sc_dt::scfx_ieee_double::scfx_ieee_double (  )  [inline]

scfx_ieee.h151 行で定義されています。

00152 {
00153     m_id.d = 0.0;
00154 }

sc_dt::scfx_ieee_double::scfx_ieee_double ( double  d  )  [inline]

scfx_ieee.h157 行で定義されています。

00158 {
00159     m_id.d = d;
00160 }

sc_dt::scfx_ieee_double::scfx_ieee_double ( const scfx_ieee_double a  )  [inline]

scfx_ieee.h163 行で定義されています。

00164 {
00165     m_id.d = a.m_id.d;
00166 }


関数

scfx_ieee_double & sc_dt::scfx_ieee_double::operator= ( double  d  )  [inline]

scfx_ieee.h171 行で定義されています。

00172 {
00173     m_id.d = d;
00174     return *this;
00175 }

scfx_ieee_double & sc_dt::scfx_ieee_double::operator= ( const scfx_ieee_double a  )  [inline]

scfx_ieee.h179 行で定義されています。

00180 {
00181     m_id.d = a.m_id.d;
00182     return *this;
00183 }

sc_dt::scfx_ieee_double::operator double (  )  const [inline]

scfx_ieee.h187 行で定義されています。

00188 {
00189     return m_id.d;
00190 }

unsigned int sc_dt::scfx_ieee_double::negative (  )  const [inline]

scfx_ieee.h195 行で定義されています。

00196 {
00197     return m_id.s.negative;
00198 }

void sc_dt::scfx_ieee_double::negative ( unsigned int  a  )  [inline]

scfx_ieee.h202 行で定義されています。

00203 {
00204     m_id.s.negative = a;
00205 }

int sc_dt::scfx_ieee_double::exponent (  )  const [inline]

scfx_ieee.h209 行で定義されています。

00210 {
00211     return m_id.s.exponent - SCFX_IEEE_DOUBLE_BIAS;
00212 }

void sc_dt::scfx_ieee_double::exponent ( int  a  )  [inline]

scfx_ieee.h216 行で定義されています。

00217 {
00218     m_id.s.exponent = SCFX_IEEE_DOUBLE_BIAS + a;
00219 }

unsigned int sc_dt::scfx_ieee_double::mantissa0 (  )  const [inline]

scfx_ieee.h223 行で定義されています。

00224 {
00225     return m_id.s.mantissa0;
00226 }

void sc_dt::scfx_ieee_double::mantissa0 ( unsigned int  a  )  [inline]

scfx_ieee.h230 行で定義されています。

00231 {
00232     m_id.s.mantissa0 = a;
00233 }

unsigned int sc_dt::scfx_ieee_double::mantissa1 (  )  const [inline]

scfx_ieee.h237 行で定義されています。

00238 {
00239     return m_id.s.mantissa1;
00240 }

void sc_dt::scfx_ieee_double::mantissa1 ( unsigned int  a  )  [inline]

scfx_ieee.h244 行で定義されています。

00245 {
00246     m_id.s.mantissa1 = a;
00247 }

bool sc_dt::scfx_ieee_double::is_zero (  )  const [inline]

scfx_ieee.h252 行で定義されています。

00253 {
00254     return ( exponent() == SCFX_IEEE_DOUBLE_E_MIN - 1 &&
00255              mantissa0() == 0U && mantissa1() == 0U );
00256 }

bool sc_dt::scfx_ieee_double::is_subnormal (  )  const [inline]

scfx_ieee.h260 行で定義されています。

00261 {
00262     return ( exponent() == SCFX_IEEE_DOUBLE_E_MIN - 1 &&
00263              ( mantissa0() != 0U || mantissa1() != 0U ) );
00264 }

bool sc_dt::scfx_ieee_double::is_normal (  )  const [inline]

scfx_ieee.h268 行で定義されています。

00269 {
00270     return ( exponent() >= SCFX_IEEE_DOUBLE_E_MIN &&
00271              exponent() <= SCFX_IEEE_DOUBLE_E_MAX );
00272 }

bool sc_dt::scfx_ieee_double::is_inf (  )  const [inline]

scfx_ieee.h276 行で定義されています。

00277 {
00278     return ( exponent() == SCFX_IEEE_DOUBLE_E_MAX + 1 &&
00279              mantissa0() == 0U && mantissa1() == 0U );
00280 }

bool sc_dt::scfx_ieee_double::is_nan (  )  const [inline]

scfx_ieee.h284 行で定義されています。

00285 {
00286     return ( exponent() == SCFX_IEEE_DOUBLE_E_MAX + 1 &&
00287              ( mantissa0() != 0U || mantissa1() != 0U ) );
00288 }

void sc_dt::scfx_ieee_double::set_inf (  )  [inline]

scfx_ieee.h293 行で定義されています。

00294 {
00295     exponent( SCFX_IEEE_DOUBLE_E_MAX + 1 );
00296     mantissa0( 0U );
00297     mantissa1( 0U );
00298 }

void sc_dt::scfx_ieee_double::set_nan (  )  [inline]

scfx_ieee.h302 行で定義されています。

00303 {
00304     exponent( SCFX_IEEE_DOUBLE_E_MAX + 1 );
00305     mantissa0( (unsigned int) -1 );
00306     mantissa1( (unsigned int) -1 );
00307 }

int sc_dt::scfx_ieee_double::msb (  )  const [inline]

scfx_ieee.h314 行で定義されています。

00315 {
00316     unsigned int m0 = mantissa0();
00317     unsigned int m1 = mantissa1();
00318     if( m0 != 0 )
00319     {
00320         int i = 0;
00321         MSB_STATEMENT(m0,16);
00322         MSB_STATEMENT(m0,8);
00323         MSB_STATEMENT(m0,4);
00324         MSB_STATEMENT(m0,2);
00325         MSB_STATEMENT(m0,1);
00326         return ( i - 20 );
00327     }
00328     else if( m1 != 0 )
00329     {
00330         int i = 0;
00331         MSB_STATEMENT(m1,16);
00332         MSB_STATEMENT(m1,8);
00333         MSB_STATEMENT(m1,4);
00334         MSB_STATEMENT(m1,2);
00335         MSB_STATEMENT(m1,1);
00336         return ( i - 52 );
00337     }
00338     else
00339     {
00340         return 0;
00341     }
00342 }

int sc_dt::scfx_ieee_double::lsb (  )  const [inline]

scfx_ieee.h350 行で定義されています。

00351 {
00352     unsigned int m0 = mantissa0();
00353     unsigned int m1 = mantissa1();
00354     if( m1 != 0 )
00355     {
00356         int i = 31;
00357         LSB_STATEMENT(m1,16);
00358         LSB_STATEMENT(m1,8);
00359         LSB_STATEMENT(m1,4);
00360         LSB_STATEMENT(m1,2);
00361         LSB_STATEMENT(m1,1);
00362         return ( i - 52 );
00363     }
00364     else if( m0 != 0 )
00365     {
00366         int i = 31;
00367         LSB_STATEMENT(m0,16);
00368         LSB_STATEMENT(m0,8);
00369         LSB_STATEMENT(m0,4);
00370         LSB_STATEMENT(m0,2);
00371         LSB_STATEMENT(m0,1);
00372         return ( i - 20 );
00373     }
00374     else
00375     {
00376         return 0;
00377     }
00378 }

const scfx_ieee_double sc_dt::scfx_ieee_double::nan (  )  [inline, static]

scfx_ieee.h385 行で定義されています。

00386 {
00387     scfx_ieee_double id;
00388     id.set_nan();
00389     return id;
00390 }

const scfx_ieee_double sc_dt::scfx_ieee_double::inf ( int  sign  )  [inline, static]

scfx_ieee.h394 行で定義されています。

00395 {
00396     scfx_ieee_double id( sign );
00397     id.set_inf();
00398     return id;
00399 }


変数

scfx_ieee.h108 行で定義されています。


このクラスの説明は次のファイルから生成されました:

SystemCに対してFri Jun 6 20:12:48 2008に生成されました。  doxygen 1.5.6