64 #define MSB_STATEMENT(n) if( x >> n ) { x >>= n; i += n; }
71 # if defined(SC_LONG_64)
73 # endif // defined(SC_LONG_64)
84 #define LSB_STATEMENT(n) if( x << n ) { x <<= n; i -= n; }
91 # if defined(SC_LONG_64)
96 # endif // defined(SC_LONG_64)
145 if( (s[2] ==
'u' || s[2] ==
'U') && (s[3] ==
's' || s[3] ==
'S') ) {
149 if( (s[2] ==
's' || s[2] ==
'S') && (s[3] ==
'm' || s[3] ==
'M') ) {
159 if( (s[2] ==
'u' || s[2] ==
'U') && (s[3] ==
's' || s[3] ==
'S') ) {
163 if( (s[2] ==
's' || s[2] ==
'S') && (s[3] ==
'm' || s[3] ==
'M') ) {
173 if( (s[2] ==
'u' || s[2] ==
'U') && (s[3] ==
's' || s[3] ==
'S') ) {
177 if( (s[2] ==
's' || s[2] ==
'S') && (s[3] ==
'm' || s[3] ==
'M') ) {
193 if( (s[2] ==
's' || s[2] ==
'S') && (s[3] ==
'd' || s[3] ==
'D') ) {
212 const char* s1 = s + 1;
221 case 'B': base = 2; s += 2;
break;
223 case 'O': base = 8; s += 2;
break;
225 case 'D': base = 10; s += 2;
break;
227 case 'X': base = 16; s += 2;
break;
238 while( *a != 0 && *b != 0 && *a == *b )
243 return ( *a == 0 && *b == 0 );
264 if( *s ==
'e' || *s ==
'E' )
267 if( *s ==
'+' || *s ==
'-' )
285 case '0':
case '1':
case '2':
case '3':
case '4':
286 case '5':
case '6':
case '7':
case '8':
case '9':
318 case '0':
case '1':
case '2':
case '3':
319 case '4':
case '5':
case '6':
case '7':
335 case '0':
case '1':
case '2':
case '3':
case '4':
336 case '5':
case '6':
case '7':
case '8':
case '9':
337 case 'a':
case 'b':
case 'c':
case 'd':
case 'e':
case 'f':
338 case 'A':
case 'B':
case 'C':
case 'D':
case 'E':
case 'F':
352 case '0':
case '1':
case '-':
394 case '0':
case '1':
case '2':
case '3':
case '4':
395 case '5':
case '6':
case '7':
case '8':
case '9':
398 case 'a':
case 'b':
case 'c':
case 'd':
case 'e':
case 'f':
399 to_digit = c -
'a' + 10;
401 case 'A':
case 'B':
case 'C':
case 'D':
case 'E':
case 'F':
402 to_digit = c -
'A' + 10;
507 int scale = 1000000000;
510 int digit = exp / scale;
512 if( digit != 0 || ! first )
514 s +=
static_cast<char>( digit +
'0' );
void scfx_print_nan(scfx_string &s)
int scfx_parse_sign(const char *&s, bool &sign_char)
void scfx_print_prefix(scfx_string &s, sc_numrep numrep)
bool scfx_is_equal(const char *a, const char *b)
bool scfx_is_digit(char c, sc_numrep numrep)
sc_numrep scfx_parse_prefix(const char *&s)
int scfx_parse_base(const char *&s)
uint64 const sc_uint_base int b
int scfx_find_msb(unsigned long x)
int scfx_find_lsb(unsigned long x)
bool scfx_is_inf(const char *s)
void scfx_print_exp(scfx_string &s, int exp)
void scfx_tc2csd(scfx_string &, int)
bool scfx_exp_start(const char *s)
void scfx_csd2tc(scfx_string &)
void scfx_print_inf(scfx_string &s, bool negative)
int scfx_to_digit(char c, sc_numrep numrep)
bool scfx_is_nan(const char *s)