66 #define MSB_STATEMENT(n) if( x >> n ) { x >>= n; i += n; } 73 # if defined(SC_LONG_64) 75 # endif // defined(SC_LONG_64) 86 #define LSB_STATEMENT(n) if( x << n ) { x <<= n; i -= n; } 93 # if defined(SC_LONG_64) 98 # endif // defined(SC_LONG_64) 147 if( (s[2] ==
'u' || s[2] ==
'U') && (s[3] ==
's' || s[3] ==
'S') ) {
151 if( (s[2] ==
's' || s[2] ==
'S') && (s[3] ==
'm' || s[3] ==
'M') ) {
161 if( (s[2] ==
'u' || s[2] ==
'U') && (s[3] ==
's' || s[3] ==
'S') ) {
165 if( (s[2] ==
's' || s[2] ==
'S') && (s[3] ==
'm' || s[3] ==
'M') ) {
175 if( (s[2] ==
'u' || s[2] ==
'U') && (s[3] ==
's' || s[3] ==
'S') ) {
179 if( (s[2] ==
's' || s[2] ==
'S') && (s[3] ==
'm' || s[3] ==
'M') ) {
195 if( (s[2] ==
's' || s[2] ==
'S') && (s[3] ==
'd' || s[3] ==
'D') ) {
214 const char* s1 = s + 1;
223 case 'B': base = 2; s += 2;
break;
225 case 'O': base = 8; s += 2;
break;
227 case 'D': base = 10; s += 2;
break;
229 case 'X': base = 16; s += 2;
break;
240 while( *a != 0 && *b != 0 && *a == *b )
245 return ( *a == 0 && *b == 0 );
266 if( *s ==
'e' || *s ==
'E' )
269 if( *s ==
'+' || *s ==
'-' )
287 case '0':
case '1':
case '2':
case '3':
case '4':
288 case '5':
case '6':
case '7':
case '8':
case '9':
320 case '0':
case '1':
case '2':
case '3':
321 case '4':
case '5':
case '6':
case '7':
337 case '0':
case '1':
case '2':
case '3':
case '4':
338 case '5':
case '6':
case '7':
case '8':
case '9':
339 case 'a':
case 'b':
case 'c':
case 'd':
case 'e':
case 'f':
340 case 'A':
case 'B':
case 'C':
case 'D':
case 'E':
case 'F':
354 case '0':
case '1':
case '-':
396 case '0':
case '1':
case '2':
case '3':
case '4':
397 case '5':
case '6':
case '7':
case '8':
case '9':
400 case 'a':
case 'b':
case 'c':
case 'd':
case 'e':
case 'f':
401 to_digit = c -
'a' + 10;
403 case 'A':
case 'B':
case 'C':
case 'D':
case 'E':
case 'F':
404 to_digit = c -
'A' + 10;
509 int scale = 1000000000;
512 int digit = exp / scale;
514 if( digit != 0 || ! first )
516 s +=
static_cast<char>( digit +
'0' );
int scfx_parse_sign(const char *&s, bool &sign_char)
void scfx_print_nan(scfx_string &s)
bool scfx_is_equal(const char *a, const char *b)
int scfx_to_digit(char c, sc_numrep numrep)
Simple string class for internal use.
bool scfx_is_digit(char c, sc_numrep numrep)
uint64 const sc_uint_base int b
int scfx_parse_base(const char *&s)
int scfx_find_msb(unsigned long x)
void scfx_print_exp(scfx_string &s, int exp)
sc_numrep
Enumeration of number representations for character string conversion.
bool scfx_is_nan(const char *s)
void scfx_csd2tc(scfx_string &)
void scfx_tc2csd(scfx_string &, int)
bool scfx_exp_start(const char *s)
int scfx_find_lsb(unsigned long x)
void scfx_print_inf(scfx_string &s, bool negative)
sc_numrep scfx_parse_prefix(const char *&s)
bool scfx_is_inf(const char *s)
void scfx_print_prefix(scfx_string &s, sc_numrep numrep)