Searched refs:radix (Results 1 - 25 of 87) sorted by relevance

1234

/external/apache-harmony/math/src/test/java/org/apache/harmony/tests/java/math/
H A DBigIntegerToStringTest.java29 * Method: toString(int radix)
33 * If 36 < radix < 2 it should be set to 10
37 int radix = 10;
38 BigInteger aNumber = new BigInteger(value, radix);
44 * test negative number of radix 2
48 int radix = 2;
49 BigInteger aNumber = new BigInteger(value, radix);
50 String result = aNumber.toString(radix);
55 * test positive number of radix 2
59 int radix
[all...]
H A DBigIntegerConstructorsTest.java30 * BigInteger(String val, int radix)
571 * Create a number from a string value and radix.
572 * Verify an exception thrown if a radix is out of range
576 int radix = 45;
578 new BigInteger(value, radix);
585 * Create a number from a string value and radix.
590 int radix = 10;
592 new BigInteger(value, radix);
599 * Create a number from a string value and radix.
604 int radix
[all...]
/external/dropbear/libtommath/
H A Dbn_mp_read_radix.c18 /* read a string [ASCII] in a given radix */
19 int mp_read_radix (mp_int * a, const char *str, int radix) argument
27 /* make sure the radix is ok */
28 if (radix < 2 || radix > 64) {
47 /* if the radix < 36 the conversion is case insensitive
51 ch = (char) ((radix < 36) ? toupper (*str) : *str);
59 * and is less than the given radix add it
62 if (y < radix) {
63 if ((res = mp_mul_d (a, (mp_digit) radix,
[all...]
H A Dbn_mp_radix_size.c19 int mp_radix_size (mp_int * a, int radix, int *size) argument
28 if (radix == 2) {
33 /* make sure the radix is in range */
34 if (radix < 2 || radix > 64) {
61 if ((res = mp_div_d (&t, (mp_digit) radix, &t, &d)) != MP_OKAY) {
H A Dbn_mp_fwrite.c18 int mp_fwrite(mp_int *a, int radix, FILE *stream) argument
23 if ((err = mp_radix_size(a, radix, &len)) != MP_OKAY) {
32 if ((err = mp_toradix(a, buf, radix)) != MP_OKAY) {
H A Dbn_mp_fread.c19 int mp_fread(mp_int *a, int radix, FILE *stream) argument
36 /* find y in the radix map */
37 for (y = 0; y < radix; y++) {
42 if (y == radix) {
47 if ((err = mp_mul_d(a, radix, a)) != MP_OKAY) {
H A Dbn_mp_toradix.c18 /* stores a bignum as a ASCII string in a given radix (2..64) */
19 int mp_toradix (mp_int * a, char *str, int radix) argument
26 /* check range of the radix */
27 if (radix < 2 || radix > 64) {
51 if ((res = mp_div_d (&t, (mp_digit) radix, &t, &d)) != MP_OKAY) {
H A Dbn_mp_toradix_n.c18 /* stores a bignum as a ASCII string in a given radix (2..64)
22 int mp_toradix_n(mp_int * a, char *str, int radix, int maxlen) argument
29 /* check range of the maxlen, radix */
30 if (maxlen < 2 || radix < 2 || radix > 64) {
64 if ((res = mp_div_d (&t, (mp_digit) radix, &t, &d)) != MP_OKAY) {
/external/icu4c/common/
H A Dustrfmt.h14 uprv_itou (UChar * buffer, int32_t capacity, uint32_t i, uint32_t radix, int32_t minwidth);
H A Dustrfmt.c13 * Fills in a UChar* string with the radix-based representation of a
20 * @param radix the radix from 2..36
29 uint32_t i, uint32_t radix, int32_t minwidth)
37 digit = (int)(i % radix);
39 i=i/radix;
28 uprv_itou(UChar * buffer, int32_t capacity, uint32_t i, uint32_t radix, int32_t minwidth) argument
H A Dutil_props.cpp28 int8_t radix = 10; local
33 radix = 16;
38 radix = 8;
43 int32_t d = u_digit(rule.charAt(p++), radix);
49 int32_t v = (value * radix) + d;
178 * @param radix the radix in which to parse; must be >= 2 and <=
186 int32_t& pos, int8_t radix) {
188 // assert(radix >= 2);
189 // assert(radix <
185 parseNumber(const UnicodeString& text, int32_t& pos, int8_t radix) argument
[all...]
H A Dcstring.c138 * Takes a int32_t and fills in a char* string with that number "radix"-based.
144 T_CString_integerToString(char* buffer, int32_t v, int32_t radix) argument
152 U_ASSERT(radix>=2 && radix<=16);
154 if(v<0 && radix == 10) {
163 digit = (uint8_t)(uval % radix);
165 uval = uval / radix;
177 * Takes a int64_t and fills in a char* string with that number "radix"-based.
182 T_CString_int64ToString(char* buffer, int64_t v, uint32_t radix) argument
190 U_ASSERT(radix>
214 T_CString_stringToInteger(const char *integerString, int32_t radix) argument
[all...]
/external/icu4c/tools/genrb/
H A Drbutil.h25 int32_t itostr(char * buffer, int32_t i, uint32_t radix, int32_t pad);
H A Drbutil.c66 itostr(char * buffer, int32_t i, uint32_t radix, int32_t pad) argument
82 digit = (int)(i % radix);
84 i=i/radix;
/external/qemu/distrib/sdl-1.2.12/src/stdlib/
H A DSDL_string.c33 static size_t SDL_ScanLong(const char *text, int radix, long *valuep) argument
43 if ( radix == 16 && SDL_strncmp(text, "0x", 2) == 0 ) {
50 } else if ( radix == 16 && SDL_isupperhex(*text) ) {
52 } else if ( radix == 16 && SDL_islowerhex(*text) ) {
57 value *= radix;
73 static size_t SDL_ScanUnsignedLong(const char *text, int radix, unsigned long *valuep) argument
78 if ( radix == 16 && SDL_strncmp(text, "0x", 2) == 0 ) {
85 } else if ( radix == 16 && SDL_isupperhex(*text) ) {
87 } else if ( radix == 16 && SDL_islowerhex(*text) ) {
92 value *= radix;
104 SDL_ScanUintPtrT(const char *text, int radix, uintptr_t *valuep) argument
136 SDL_ScanLongLong(const char *text, int radix, Sint64 *valuep) argument
176 SDL_ScanUnsignedLongLong(const char *text, int radix, Uint64 *valuep) argument
457 SDL_ltoa(long value, char *string, int radix) argument
487 SDL_ultoa(unsigned long value, char *string, int radix) argument
555 SDL_lltoa(Sint64 value, char *string, int radix) argument
585 SDL_ulltoa(Uint64 value, char *string, int radix) argument
749 int radix = 10; local
1013 SDL_PrintLong(char *text, long value, int radix, size_t maxlen) argument
1027 SDL_PrintUnsignedLong(char *text, unsigned long value, int radix, size_t maxlen) argument
1042 SDL_PrintLongLong(char *text, Sint64 value, int radix, size_t maxlen) argument
1056 SDL_PrintUnsignedLongLong(char *text, Uint64 value, int radix, size_t maxlen) argument
1127 int radix = 10; local
[all...]
/external/icu4c/i18n/
H A Desctrn.h25 * empty, a radix, typically 16 or 10, a minimum digit count,
59 * The radix to display the number in. Typically 16 or 10. Must
62 int32_t radix; member in class:EscapeTransliterator
80 * prefix, suffix, radix, and minDigits of this object are used
99 int32_t radix, int32_t minDigits,
H A Dnfrs.h86 // raise radix to the power exponent, only non-negative exponents
87 int64_t util64_pow(int32_t radix, uint32_t exponent);
90 uint32_t util64_tou(int64_t n, UChar* buffer, uint32_t buflen, uint32_t radix = 10, UBool raw = FALSE);
93 int64_t util64_utoi(const UChar* str, uint32_t radix = 10);
94 uint32_t util64_toa(int64_t n, char* buffer, uint32_t buflen, uint32_t radix = 10, UBool raw = FALSE);
95 int64_t util64_atoi(const char* str, uint32_t radix);
H A Dnfrs.cpp797 int64_t util64_atoi(const char* str, uint32_t radix) argument
799 if (radix > 36) {
800 radix = 36;
801 } else if (radix < 2) {
802 radix = 2;
804 int64_t lradix = radix;
813 while ((b = digitInfo[*str++]) && ((b &= 0x7f) < radix)) {
823 int64_t util64_utoi(const UChar* str, uint32_t radix) argument
825 if (radix > 36) {
826 radix
850 util64_toa(int64_t w, char* buf, uint32_t len, uint32_t radix, UBool raw) argument
896 util64_tou(int64_t w, UChar* buf, uint32_t len, uint32_t radix, UBool raw) argument
[all...]
/external/webkit/Source/JavaScriptCore/runtime/
H A DJSGlobalObjectFunctions.h55 double parseIntOverflow(const char*, int length, int radix);
56 double parseIntOverflow(const UChar*, int length, int radix);
H A DJSGlobalObjectFunctions.cpp160 static int parseDigit(unsigned short c, int radix) argument
171 if (digit >= radix)
176 double parseIntOverflow(const char* s, int length, int radix) argument
188 int digit = parseDigit(*p, radix);
192 radixMultiplier *= radix;
198 double parseIntOverflow(const UChar* s, int length, int radix) argument
210 int digit = parseDigit(*p, radix);
214 radixMultiplier *= radix;
220 static double parseInt(const UString& s, int radix) argument
239 if ((radix
463 int32_t radix = exec->argument(1).toInt32(exec); local
[all...]
H A DNumberPrototype.cpp211 int radix; local
213 radix = radixValue.asInt32();
215 radix = 10;
217 radix = static_cast<int>(radixValue.toInteger(exec)); // nan -> 0
219 if (radix == 10)
225 if (radix == 36) {
235 if (radix < 2 || radix > 36)
236 return throwVMError(exec, createRangeError(exec, "toString() radix argument must be between 2 and 36"));
238 // INT_MAX results in 1024 characters left of the dot with radix
[all...]
/external/icu4c/i18n/unicode/
H A Dnumsys.h93 * Create a numbering system using the specified radix, type, and description.
94 * @param radix The radix (base) for this numbering system.
101 static NumberingSystem* U_EXPORT2 createInstance(int32_t radix, UBool isAlgorithmic, const UnicodeString& description, UErrorCode& status );
120 * Returns the radix of this numbering system.
169 int32_t radix; member in class:NumberingSystem
173 void setRadix(int32_t radix);
/external/icu4c/io/
H A Dufmt_cmn.h71 * Convert a UChar in hex radix to an integer value.
79 * Determine if a UChar is a digit for a specified radix.
81 * @param radix The desired radix.
82 * @return TRUE if <TT>c</TT> is a digit in <TT>radix</TT>, FALSE otherwise.
86 int32_t radix);
89 * Convert an int64_t to a UChar* in a specified radix
94 * @param radix The desired radix
103 uint8_t radix,
[all...]
/external/v8/src/
H A Dconversions.cc123 static bool isDigit(int x, int radix) { argument
124 return (x >= '0' && x <= '9' && x < '0' + radix)
125 || (radix > 10 && x >= 'a' && x < 'a' + radix - 10)
126 || (radix > 10 && x >= 'A' && x < 'A' + radix - 10);
135 // Parsing integers with radix 2, 4, 8, 16, 32. Assumes current != end.
152 const int radix = (1 << radix_log_2); local
156 if (*current >= '0' && *current <= '9' && *current < '0' + radix) {
158 } else if (radix > 1
[all...]
/external/srec/portable/src/
H A DLCHAR.c250 * @param radix Base of value; must be in the range 2 - 36
252 static void pxtoa(unsigned long val, LCHAR *buf, unsigned radix, int is_neg) argument
272 digval = (unsigned)(val % radix);
273 val /= radix; /* get next digit */
302 ESR_ReturnCode litostr(int value, LCHAR *string, size_t *len, int radix) argument
311 if (radix == 10 && value < 0)
312 pxtoa((unsigned long) value, buffer, radix, 1);
314 pxtoa((unsigned long) value, buffer, radix, 0);
331 ESR_ReturnCode lultostr(unsigned long value, LCHAR *string, size_t *len, int radix) argument
339 pxtoa(value, buffer, radix,
[all...]

Completed in 1196 milliseconds

1234