Lines Matching defs:radix
63 function. Since a number n in radix r takes up about log_r(n)
88 /* Value to digit maps for radix conversion */
2464 stream 'ofp'. Output is generated using the internal radix.
2565 /* {{{ mp_read_radix(mp, str, radix) */
2568 mp_read_radix(mp, str, radix)
2576 mp_err mp_read_radix(mp_int *mp, const char *str, int radix)
2582 ARGCHK(mp != NULL && str != NULL && radix >= 2 && radix <= MAX_RADIX,
2589 (s_mp_tovalue(str[ix], radix) < 0) &&
2603 while((val = s_mp_tovalue(str[ix], radix)) >= 0) {
2604 if((res = s_mp_mul_d(mp, radix)) != MP_OKAY)
2622 int radix = default_radix;
2629 (s_mp_tovalue(cx, radix) < 0) &&
2645 radix = 16;
2648 radix = 8;
2652 res = mp_read_radix(a, str, radix);
2661 /* {{{ mp_radix_size(mp, radix) */
2663 int mp_radix_size(mp_int *mp, int radix)
2667 if(!mp || radix < 2 || radix > MAX_RADIX)
2672 return s_mp_outlen(bits, radix);
2678 /* {{{ mp_toradix(mp, str, radix) */
2680 mp_err mp_toradix(mp_int *mp, char *str, int radix)
2685 ARGCHK(radix > 1 && radix <= MAX_RADIX, MP_RANGE);
2694 mp_digit rem, rdx = (mp_digit)radix;
2711 ch = s_mp_todigit(rem, radix, 0);
2959 alternative to multiplication by powers of the radix
3083 /* Divide by two -- take advantage of radix properties to do it fast */
3193 leading digit of b to be at least half the radix, which we
4595 Convert the given character to its digit value, in the given radix.
4596 If the given character is not understood in the given radix, -1 is
4599 The results will be odd if you use a radix < 2 or > 62, you are
4636 Convert val to a radix-r digit, if possible. If val is out of range
4638 the value in the given radix.
4640 The results may be odd if you use a radix < 2 or > 64, you are
4662 /* {{{ s_mp_outlen(bits, radix) */
4665 Return an estimate for how long a string is needed to hold a radix