#include <scfx_ieee.h>
Public メソッド | |
scfx_ieee_double () | |
scfx_ieee_double (double) | |
scfx_ieee_double (const scfx_ieee_double &) | |
scfx_ieee_double & | operator= (double) |
scfx_ieee_double & | operator= (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.h の 105 行で定義されています。
sc_dt::scfx_ieee_double::scfx_ieee_double | ( | ) | [inline] |
sc_dt::scfx_ieee_double::scfx_ieee_double | ( | double | d | ) | [inline] |
sc_dt::scfx_ieee_double::scfx_ieee_double | ( | const scfx_ieee_double & | a | ) | [inline] |
scfx_ieee_double & sc_dt::scfx_ieee_double::operator= | ( | double | d | ) | [inline] |
scfx_ieee_double & sc_dt::scfx_ieee_double::operator= | ( | const scfx_ieee_double & | a | ) | [inline] |
sc_dt::scfx_ieee_double::operator double | ( | ) | const [inline] |
unsigned int sc_dt::scfx_ieee_double::negative | ( | ) | const [inline] |
void sc_dt::scfx_ieee_double::negative | ( | unsigned int | a | ) | [inline] |
int sc_dt::scfx_ieee_double::exponent | ( | ) | const [inline] |
void sc_dt::scfx_ieee_double::exponent | ( | int | a | ) | [inline] |
unsigned int sc_dt::scfx_ieee_double::mantissa0 | ( | ) | const [inline] |
void sc_dt::scfx_ieee_double::mantissa0 | ( | unsigned int | a | ) | [inline] |
unsigned int sc_dt::scfx_ieee_double::mantissa1 | ( | ) | const [inline] |
void sc_dt::scfx_ieee_double::mantissa1 | ( | unsigned int | a | ) | [inline] |
bool sc_dt::scfx_ieee_double::is_zero | ( | ) | const [inline] |
scfx_ieee.h の 252 行で定義されています。
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.h の 260 行で定義されています。
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.h の 268 行で定義されています。
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.h の 276 行で定義されています。
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.h の 284 行で定義されています。
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.h の 293 行で定義されています。
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.h の 302 行で定義されています。
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.h の 314 行で定義されています。
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.h の 350 行で定義されています。
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.h の 385 行で定義されています。
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.h の 394 行で定義されています。
00395 { 00396 scfx_ieee_double id( sign ); 00397 id.set_inf(); 00398 return id; 00399 }
ieee_double sc_dt::scfx_ieee_double::m_id [private] |
scfx_ieee.h の 108 行で定義されています。