#include <scfx_pow10.h>
Public メソッド | |
scfx_pow10 () | |
~scfx_pow10 () | |
const scfx_rep | operator() (int) |
Private メソッド | |
scfx_rep * | pos (int) |
scfx_rep * | neg (int) |
Private 変数 | |
scfx_rep | m_pos [SCFX_POW10_TABLE_SIZE] |
scfx_rep | m_neg [SCFX_POW10_TABLE_SIZE] |
scfx_pow10.h の 69 行で定義されています。
sc_dt::scfx_pow10::scfx_pow10 | ( | ) |
scfx_pow10.cpp の 59 行で定義されています。
00060 { 00061 m_pos[0] = scfx_rep( 10.0 ); 00062 m_neg[0] = scfx_rep( 0.1 ); 00063 00064 for( int i = 1; i < SCFX_POW10_TABLE_SIZE; i ++ ) 00065 { 00066 m_pos[i].set_nan(); 00067 m_neg[i].set_nan(); 00068 } 00069 }
sc_dt::scfx_pow10::~scfx_pow10 | ( | ) |
const scfx_rep sc_dt::scfx_pow10::operator() | ( | int | i | ) |
scfx_pow10.cpp の 76 行で定義されています。
00077 { 00078 if( i == 0 ) { 00079 return scfx_rep( 1.0 ); 00080 } 00081 00082 if( i > 0 ) 00083 { 00084 int bit = scfx_find_msb( i ); 00085 scfx_rep result = *pos( bit ); 00086 if( bit ) 00087 { 00088 while( -- bit >= 0 ) 00089 { 00090 if( ( 1 << bit ) & i ) 00091 { 00092 scfx_rep* tmp = mult_scfx_rep( result, *pos( bit ) ); 00093 result = *tmp; 00094 delete tmp; 00095 } 00096 } 00097 } 00098 return result; 00099 } 00100 else 00101 { 00102 i = -i; 00103 int bit = scfx_find_msb( i ); 00104 scfx_rep result = *neg( bit ); 00105 if( bit ) 00106 { 00107 while( -- bit >= 0 ) 00108 { 00109 if( ( 1 << bit ) & i ) 00110 { 00111 scfx_rep* tmp = mult_scfx_rep( result, *neg( bit ) ); 00112 result = *tmp; 00113 delete tmp; 00114 } 00115 } 00116 } 00117 return result; 00118 } 00119 }
scfx_rep * sc_dt::scfx_pow10::pos | ( | int | i | ) | [private] |
scfx_rep * sc_dt::scfx_pow10::neg | ( | int | i | ) | [private] |
scfx_pow10.h の 84 行で定義されています。
scfx_pow10.h の 85 行で定義されています。