Lines Matching defs:radix

67   function.  Since a number n in radix r takes up about log_r(n)
92 /* Value to digit maps for radix conversion */
2636 stream 'ofp'. Output is generated using the internal radix.
2737 /* {{{ mp_read_radix(mp, str, radix) */
2740 mp_read_radix(mp, str, radix)
2748 mp_err mp_read_radix(mp_int *mp, const char *str, int radix)
2754 ARGCHK(mp != NULL && str != NULL && radix >= 2 && radix <= MAX_RADIX,
2761 (s_mp_tovalue(str[ix], radix) < 0) &&
2775 while((val = s_mp_tovalue(str[ix], radix)) >= 0) {
2776 if((res = s_mp_mul_d(mp, radix)) != MP_OKAY)
2794 int radix = default_radix;
2801 (s_mp_tovalue(cx, radix) < 0) &&
2817 radix = 16;
2820 radix = 8;
2824 res = mp_read_radix(a, str, radix);
2833 /* {{{ mp_radix_size(mp, radix) */
2835 int mp_radix_size(mp_int *mp, int radix)
2839 if(!mp || radix < 2 || radix > MAX_RADIX)
2844 return s_mp_outlen(bits, radix);
2850 /* {{{ mp_toradix(mp, str, radix) */
2852 mp_err mp_toradix(mp_int *mp, char *str, int radix)
2857 ARGCHK(radix > 1 && radix <= MAX_RADIX, MP_RANGE);
2866 mp_digit rem, rdx = (mp_digit)radix;
2883 ch = s_mp_todigit(rem, radix, 0);
3131 alternative to multiplication by powers of the radix
3255 /* Divide by two -- take advantage of radix properties to do it fast */
3365 leading digit of b to be at least half the radix, which we
4767 Convert the given character to its digit value, in the given radix.
4768 If the given character is not understood in the given radix, -1 is
4771 The results will be odd if you use a radix < 2 or > 62, you are
4808 Convert val to a radix-r digit, if possible. If val is out of range
4810 the value in the given radix.
4812 The results may be odd if you use a radix < 2 or > 64, you are
4834 /* {{{ s_mp_outlen(bits, radix) */
4837 Return an estimate for how long a string is needed to hold a radix