Ruby
2.5.0dev(2017-10-22revision60238)
|
#include "internal.h"
#include "ruby/thread.h"
#include "ruby/util.h"
#include "id.h"
#include <math.h>
#include <float.h>
#include <ctype.h>
#include "ruby_assert.h"
Go to the source code of this file.
Data Structures | |
struct | big_div_struct |
struct | big2str_struct |
Macros | |
#define | RB_BIGNUM_TYPE_P(x) RB_TYPE_P((x), T_BIGNUM) |
#define | SIZEOF_BDIGIT_DBL SIZEOF_LONG_LONG |
#define | HOST_BIGENDIAN_P 0 |
#define | ALIGNOF(type) ((int)offsetof(struct { char f1; type f2; }, f2)) |
#define | LSHIFTABLE(d, n) ((n) < sizeof(d) * CHAR_BIT) |
#define | LSHIFTX(d, n) (!LSHIFTABLE(d, n) ? 0 : ((d) << (!LSHIFTABLE(d, n) ? 0 : (n)))) |
#define | CLEAR_LOWBITS(d, numbits) ((d) & LSHIFTX(~((d)*0), (numbits))) |
#define | FILL_LOWBITS(d, numbits) ((d) | (LSHIFTX(((d)*0+1), (numbits))-1)) |
#define | POW2_P(x) (((x)&((x)-1))==0) |
#define | BDIGITS(x) (BIGNUM_DIGITS(x)) |
#define | BITSPERDIG (SIZEOF_BDIGIT*CHAR_BIT) |
#define | BIGRAD ((BDIGIT_DBL)1 << BITSPERDIG) |
#define | BIGRAD_HALF ((BDIGIT)(BIGRAD >> 1)) |
#define | BDIGIT_MSB(d) (((d) & BIGRAD_HALF) != 0) |
#define | BIGUP(x) LSHIFTX(((x) + (BDIGIT_DBL)0), BITSPERDIG) |
#define | BIGDN(x) RSHIFT((x),BITSPERDIG) |
#define | BIGLO(x) ((BDIGIT)((x) & BDIGMAX)) |
#define | BDIGMAX ((BDIGIT)(BIGRAD-1)) |
#define | BDIGIT_DBL_MAX (~(BDIGIT_DBL)0) |
#define | BIGZEROP(x) |
#define | BIGSIZE(x) |
#define | BIGDIVREM_EXTRA_WORDS 1 |
#define | bdigit_roomof(n) roomof(n, SIZEOF_BDIGIT) |
#define | BARY_ARGS(ary) ary, numberof(ary) |
#define | BARY_ADD(z, x, y) bary_add(BARY_ARGS(z), BARY_ARGS(x), BARY_ARGS(y)) |
#define | BARY_SUB(z, x, y) bary_sub(BARY_ARGS(z), BARY_ARGS(x), BARY_ARGS(y)) |
#define | BARY_SHORT_MUL(z, x, y) bary_short_mul(BARY_ARGS(z), BARY_ARGS(x), BARY_ARGS(y)) |
#define | BARY_DIVMOD(q, r, x, y) bary_divmod(BARY_ARGS(q), BARY_ARGS(r), BARY_ARGS(x), BARY_ARGS(y)) |
#define | BARY_ZERO_P(x) bary_zero_p(BARY_ARGS(x)) |
#define | BIGNUM_SET_NEGATIVE_SIGN(b) BIGNUM_SET_SIGN(b, 0) |
#define | BIGNUM_SET_POSITIVE_SIGN(b) BIGNUM_SET_SIGN(b, 1) |
#define | bignew(len, sign) bignew_1(rb_cInteger,(len),(sign)) |
#define | BDIGITS_ZERO(ptr, n) |
#define | BARY_TRUNC(ds, n) |
#define | KARATSUBA_BALANCED(xn, yn) ((yn)/2 < (xn)) |
#define | TOOM3_BALANCED(xn, yn) (((yn)+2)/3 * 2 < (xn)) |
#define | GMP_MUL_DIGITS 20 |
#define | KARATSUBA_MUL_DIGITS 70 |
#define | TOOM3_MUL_DIGITS 150 |
#define | GMP_DIV_DIGITS 20 |
#define | GMP_BIG2STR_DIGITS 20 |
#define | GMP_STR2BIG_DIGITS 20 |
#define | NAIVE_MUL_DIGITS KARATSUBA_MUL_DIGITS |
#define | U16(a) ((uint16_t)(a)) |
#define | U32(a) ((uint32_t)(a)) |
#define | INTEGER_PACK_WORDORDER_MASK |
#define | INTEGER_PACK_BYTEORDER_MASK |
#define | FILL_DD integer_pack_fill_dd(&dp, &de, &dd, &numbits_in_dd) |
#define | TAKE_LOWBITS(n) integer_pack_take_lowbits(n, &dd, &numbits_in_dd) |
#define | PUSH_BITS(data, numbits) integer_unpack_push_bits(data, numbits, &dd, &numbits_in_dd, &dp) |
#define | BIGNUM_DEBUG 0 |
#define | ON_DEBUG(x) |
#define | BIGNUM_SET_LEN(b, l) |
#define | conv_digit(c) (ruby_digit36_to_number_table[(unsigned char)(c)]) |
#define | ADV(n) |
#define | ASSERT_LEN() |
#define | MAX_BASE36_POWER_TABLE_ENTRIES (SIZEOF_SIZE_T * CHAR_BIT + 1) |
#define | rb_bdigit_dbl_isqrt(x) (BDIGIT)rb_ulong_isqrt(x) |
#define | BDIGIT_DBL_TO_DOUBLE(n) (double)(n) |
Typedefs | |
typedef void() | mulfunc_t(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t xn, const BDIGIT *yds, size_t yn, BDIGIT *wds, size_t wn) |
Enumerations | |
enum | big_op_t { big_op_gt, big_op_ge, big_op_lt, big_op_le } |
enum | { DBL_BIGDIG = ((DBL_MANT_DIG + BITSPERDIG) / BITSPERDIG) } |
Variables | |
const char | ruby_digitmap [] = "0123456789abcdefghijklmnopqrstuvwxyz" |
#define ADV | ( | n | ) |
Referenced by rb_int_parse_cstr().
#define ALIGNOF | ( | type | ) | ((int)offsetof(struct { char f1; type f2; }, f2)) |
#define ASSERT_LEN | ( | ) |
Referenced by rb_int_parse_cstr().
#define BARY_TRUNC | ( | ds, | |
n | |||
) |
Definition at line 127 of file bignum.c.
Referenced by rb_big_divrem_normal().
#define BDIGIT_DBL_MAX (~(BDIGIT_DBL)0) |
#define BDIGIT_MSB | ( | d | ) | (((d) & BIGRAD_HALF) != 0) |
#define bdigit_roomof | ( | n | ) | roomof(n, SIZEOF_BDIGIT) |
Definition at line 104 of file bignum.c.
Referenced by rb_absint_singlebit_p(), rb_absint_size(), rb_big_bit_length(), rb_integer_pack(), and rb_uint2big().
#define BDIGITS | ( | x | ) | (BIGNUM_DIGITS(x)) |
Definition at line 76 of file bignum.c.
Referenced by rb_absint_singlebit_p(), rb_absint_size(), rb_big_comp(), rb_big_divrem_normal(), rb_big_eql(), rb_big_even_p(), rb_big_isqrt(), rb_big_odd_p(), rb_integer_pack(), and rb_uint2big().
#define BDIGITS_ZERO | ( | ptr, | |
n | |||
) |
#define BIGDIVREM_EXTRA_WORDS 1 |
Definition at line 103 of file bignum.c.
Referenced by rb_big_divrem_normal().
#define BIGDN | ( | x | ) | RSHIFT((x),BITSPERDIG) |
Definition at line 82 of file bignum.c.
Referenced by rb_absint_singlebit_p(), rb_absint_size(), rb_integer_pack(), and rb_uint2big().
Definition at line 83 of file bignum.c.
Referenced by rb_absint_singlebit_p(), rb_absint_size(), rb_integer_pack(), and rb_uint2big().
#define bignew | ( | len, | |
sign | |||
) | bignew_1(rb_cInteger,(len),(sign)) |
Definition at line 116 of file bignum.c.
Referenced by rb_big_divrem_normal(), rb_big_mul_balance(), rb_big_mul_karatsuba(), rb_big_mul_normal(), rb_big_mul_toom3(), rb_big_new(), rb_big_sq_fast(), and rb_uint2big().
#define BIGNUM_SET_LEN | ( | b, | |
l | |||
) |
Definition at line 2928 of file bignum.c.
Referenced by rb_uint2big().
#define BIGNUM_SET_NEGATIVE_SIGN | ( | b | ) | BIGNUM_SET_SIGN(b, 0) |
Definition at line 113 of file bignum.c.
Referenced by rb_int2big().
#define BIGNUM_SET_POSITIVE_SIGN | ( | b | ) | BIGNUM_SET_SIGN(b, 1) |
Definition at line 114 of file bignum.c.
Referenced by rb_big_abs().
#define BIGRAD ((BDIGIT_DBL)1 << BITSPERDIG) |
#define BIGSIZE | ( | x | ) |
Definition at line 98 of file bignum.c.
Referenced by rb_big_size().
#define BIGUP | ( | x | ) | LSHIFTX(((x) + (BDIGIT_DBL)0), BITSPERDIG) |
#define BIGZEROP | ( | x | ) |
Definition at line 95 of file bignum.c.
Referenced by rb_big_pow(), rb_bigzero_p(), and rb_cmpint().
#define BITSPERDIG (SIZEOF_BDIGIT*CHAR_BIT) |
#define CLEAR_LOWBITS | ( | d, | |
numbits | |||
) | ((d) & LSHIFTX(~((d)*0), (numbits))) |
#define conv_digit | ( | c | ) | (ruby_digit36_to_number_table[(unsigned char)(c)]) |
#define FILL_DD integer_pack_fill_dd(&dp, &de, &dd, &numbits_in_dd) |
#define FILL_LOWBITS | ( | d, | |
numbits | |||
) | ((d) | (LSHIFTX(((d)*0+1), (numbits))-1)) |
#define INTEGER_PACK_BYTEORDER_MASK |
#define INTEGER_PACK_WORDORDER_MASK |
#define KARATSUBA_BALANCED | ( | xn, | |
yn | |||
) | ((yn)/2 < (xn)) |
Definition at line 132 of file bignum.c.
Referenced by rb_big_mul_karatsuba().
#define LSHIFTX | ( | d, | |
n | |||
) | (!LSHIFTABLE(d, n) ? 0 : ((d) << (!LSHIFTABLE(d, n) ? 0 : (n)))) |
#define MAX_BASE36_POWER_TABLE_ENTRIES (SIZEOF_SIZE_T * CHAR_BIT + 1) |
#define NAIVE_MUL_DIGITS KARATSUBA_MUL_DIGITS |
#define POW2_P | ( | x | ) | (((x)&((x)-1))==0) |
Definition at line 74 of file bignum.c.
Referenced by rb_absint_singlebit_p().
#define PUSH_BITS | ( | data, | |
numbits | |||
) | integer_unpack_push_bits(data, numbits, &dd, &numbits_in_dd, &dp) |
#define rb_bdigit_dbl_isqrt | ( | x | ) | (BDIGIT)rb_ulong_isqrt(x) |
Definition at line 6793 of file bignum.c.
Referenced by rb_big_even_p(), and rb_big_isqrt().
Definition at line 33 of file bignum.c.
Referenced by rb_big_divmod(), rb_big_eql(), rb_big_modulo(), rb_big_mul(), rb_big_pow(), rb_big_remainder(), and rb_cmpint().
#define TAKE_LOWBITS | ( | n | ) | integer_pack_take_lowbits(n, &dd, &numbits_in_dd) |
#define TOOM3_BALANCED | ( | xn, | |
yn | |||
) | (((yn)+2)/3 * 2 < (xn)) |
Definition at line 133 of file bignum.c.
Referenced by rb_big_mul_toom3().
enum big_op_t |
void Init_Bignum | ( | void | ) |
Definition at line 6898 of file bignum.c.
References rb_cBignum, rb_cInteger, rb_cObject, rb_define_const(), rb_define_method(), and rb_deprecate_constant().
NORETURN | ( | static inline void | invalid_radixint base | ) |
NORETURN | ( | static inline void | invalid_integerVALUE s | ) |
size_t rb_absint_numwords | ( | VALUE | val, |
size_t | word_numbits, | ||
size_t * | nlz_bits_ret | ||
) |
Definition at line 3364 of file bignum.c.
References CHAR_BIT, rb_absint_size(), and SIZE_MAX.
int rb_absint_singlebit_p | ( | VALUE | val | ) |
Definition at line 3428 of file bignum.c.
References BDIGIT, bdigit_roomof, BDIGITS, BIGDN, BIGLO, BIGNUM_LEN, dp, FIX2LONG, FIXNUM_P, numberof, POW2_P, and rb_to_int().
Referenced by rb_big_bit_length().
size_t rb_absint_size | ( | VALUE | val, |
int * | nlz_bits_ret | ||
) |
Definition at line 3229 of file bignum.c.
References BDIGIT, bdigit_roomof, BDIGITS, BIGDN, BIGLO, BIGNUM_LEN, dp, FIX2LONG, FIXNUM_P, numberof, and rb_to_int().
Referenced by rb_absint_numwords(), rb_big_bit_length(), and rb_num_to_uint().
double rb_big2dbl | ( | VALUE | x | ) |
Definition at line 5270 of file bignum.c.
Referenced by rb_big_mul(), and rb_float_pow().
long rb_big2long | ( | VALUE | x | ) |
Definition at line 5108 of file bignum.c.
Referenced by rb_num2long().
Definition at line 5062 of file bignum.c.
Referenced by rb_int2str().
unsigned long rb_big2ulong | ( | VALUE | x | ) |
Definition at line 5093 of file bignum.c.
Referenced by rb_num_to_uint().
Definition at line 6700 of file bignum.c.
References BIGNUM_NEGATIVE_P, BIGNUM_SET_POSITIVE_SIGN, and rb_big_clone().
Definition at line 6298 of file bignum.c.
References BDIGIT, RB_INTEGER_TYPE_P, rb_num_coerce_bit(), big_div_struct::yn, and big_div_struct::zds.
Definition at line 6728 of file bignum.c.
References BDIGIT, bdigit_roomof, BIGNUM_NEGATIVE_P, CHAR_BIT, LONG2FIX, rb_absint_singlebit_p(), rb_absint_size(), SIZE_MAX, and SIZET2NUM.
Definition at line 3002 of file bignum.c.
References BIGNUM_LEN.
Referenced by rb_big_abs(), rb_big_comp(), and rb_big_uminus().
Definition at line 5367 of file bignum.c.
References FIXNUM_P.
Referenced by rb_integer_float_cmp().
Definition at line 5512 of file bignum.c.
References BDIGIT, BDIGITS, BIGNUM_LEN, BIGNUM_POSITIVE_P, INT2FIX, and rb_big_clone().
Definition at line 6080 of file bignum.c.
References div, FIX2LONG, FIXNUM_P, mod, RB_BIGNUM_TYPE_P, rb_int2big(), rb_intern, and rb_num_coerce_bin().
Definition at line 2696 of file bignum.c.
References BARY_TRUNC, BDIGIT, BDIGITS, BIGDIVREM_EXTRA_WORDS, bignew, BIGNUM_LEN, BIGNUM_SIGN, LONG2FIX, rb_assoc_new(), rb_num_zerodiv(), and big_div_struct::yn.
Definition at line 5492 of file bignum.c.
References BDIGIT, BDIGITS, BIGNUM_LEN, BIGNUM_SIGN, MEMCMP, Qfalse, Qtrue, and RB_BIGNUM_TYPE_P.
Definition at line 6778 of file bignum.c.
References BDIGIT, BDIGIT_DBL, BDIGITS, BIGNUM_LEN, Qfalse, Qtrue, rb_bdigit_dbl_isqrt, and rb_ulong_isqrt().
Definition at line 6183 of file bignum.c.
References DBL2NUM, and rb_big_fdiv_double().
Definition at line 6154 of file bignum.c.
Referenced by rb_big_fdiv().
Definition at line 6840 of file bignum.c.
References BDIGIT, BDIGITS, BIGNUM_LEN, and rb_bdigit_dbl_isqrt.
Definition at line 5801 of file bignum.c.
References BIGNUM_SIGN, FIX2LONG, and FIXNUM_P.
Referenced by rb_int_pred().
Definition at line 6048 of file bignum.c.
References FIX2LONG, FIXNUM_P, RB_BIGNUM_TYPE_P, rb_int2big(), and rb_num_coerce_bin().
Definition at line 5881 of file bignum.c.
References DBL2NUM, FIX2LONG, FIXNUM_P, rb_big2dbl(), RB_BIGNUM_TYPE_P, RB_FLOAT_TYPE_P, rb_int2big(), rb_num_coerce_bin(), and RFLOAT_VALUE.
Definition at line 1671 of file bignum.c.
References bignew, BIGNUM_LEN, and BIGNUM_SIGN.
Definition at line 1852 of file bignum.c.
References bignew, BIGNUM_LEN, BIGNUM_SIGN, KARATSUBA_BALANCED, rb_eArgError, and rb_raise().
Definition at line 1543 of file bignum.c.
References bignew, BIGNUM_LEN, and BIGNUM_SIGN.
Definition at line 2249 of file bignum.c.
References bignew, BIGNUM_LEN, BIGNUM_SIGN, rb_eArgError, rb_raise(), and TOOM3_BALANCED.
VALUE rb_big_new | ( | size_t | len, |
int | sign | ||
) |
Definition at line 6417 of file bignum.c.
References BDIGIT, RB_INTEGER_TYPE_P, rb_num_coerce_bit(), big_div_struct::yn, and big_div_struct::zds.
void rb_big_pack | ( | VALUE | val, |
unsigned long * | buf, | ||
long | num_longs | ||
) |
Definition at line 3197 of file bignum.c.
References INTEGER_PACK_2COMP, INTEGER_PACK_LSWORD_FIRST, INTEGER_PACK_NATIVE_BYTE_ORDER, and rb_integer_pack().
Definition at line 5772 of file bignum.c.
References BIGNUM_SIGN, FIX2LONG, and FIXNUM_P.
Referenced by rb_int_succ().
Definition at line 6189 of file bignum.c.
References BIGNUM_NEGATIVE_P, BIGZEROP, idPow, INT2FIX, RB_BIGNUM_TYPE_P, rb_complex_raw1, RB_FLOAT_TYPE_P, rb_funcall(), RFLOAT_VALUE, round(), and SIGNED_VALUE.
Definition at line 6064 of file bignum.c.
References FIX2LONG, FIXNUM_P, RB_BIGNUM_TYPE_P, rb_int2big(), rb_intern, and rb_num_coerce_bin().
int rb_big_sign | ( | VALUE | x | ) |
Definition at line 6710 of file bignum.c.
References BIGNUM_SIGN.
size_t rb_big_size | ( | VALUE | big | ) |
Definition at line 6722 of file bignum.c.
References rb_big_size(), and SIZET2NUM.
Definition at line 1612 of file bignum.c.
References bignew, and BIGNUM_LEN.
Definition at line 5502 of file bignum.c.
References BIGNUM_NEGATE, and rb_big_clone().
VALUE rb_big_unpack | ( | unsigned long * | buf, |
long | num_longs | ||
) |
Definition at line 3205 of file bignum.c.
References INTEGER_PACK_2COMP, INTEGER_PACK_LSWORD_FIRST, INTEGER_PACK_NATIVE_BYTE_ORDER, and rb_integer_unpack().
Definition at line 6511 of file bignum.c.
References BDIGIT, RB_INTEGER_TYPE_P, rb_num_coerce_bit(), big_div_struct::yn, and big_div_struct::zds.
Definition at line 2907 of file bignum.c.
References BIGNUM_SIGN, BIGZEROP, FIX2LONG, FIXNUM_P, INT2FIX, NIL_P, RB_BIGNUM_TYPE_P, rb_cmperr(), rb_funcall(), and RTEST.
Definition at line 4509 of file bignum.c.
References rb_cstr_to_inum().
Definition at line 4219 of file bignum.c.
References NULL, rb_int_parse_cstr(), and RB_INT_PARSE_DEFAULT.
Referenced by rb_cstr_to_inum(), and rb_str_to_inum().
Definition at line 3992 of file bignum.c.
References INT2FIX, NIL_P, NULL, rb_cstr_parse_inum(), and rb_invalid_str().
Referenced by rb_cstr2inum().
VALUE rb_dbl2big | ( | double | d | ) |
Definition at line 5214 of file bignum.c.
Referenced by rb_integer_float_cmp(), and rb_integer_float_eq().
VALUE rb_int2big | ( | SIGNED_VALUE | n | ) |
Definition at line 3162 of file bignum.c.
References BIGNUM_SET_NEGATIVE_SIGN, neg, and rb_uint2big().
Referenced by rb_big_divmod(), rb_big_modulo(), rb_big_mul(), rb_big_remainder(), and rb_int2inum().
VALUE rb_int2inum | ( | SIGNED_VALUE | n | ) |
Definition at line 3190 of file bignum.c.
References FIXABLE, LONG2FIX, and rb_int2big().
VALUE rb_int_parse_cstr | ( | const char * | str, |
ssize_t | len, | ||
char ** | endp, | ||
size_t * | ndigits, | ||
int | base, | ||
int | flags | ||
) |
Definition at line 4021 of file bignum.c.
References ADV, ASSERT_LEN, bad, ISSPACE, len, Qnil, RB_INT_PARSE_PREFIX, RB_INT_PARSE_SIGN, and val.
Referenced by rb_cstr_parse_inum().
Definition at line 5285 of file bignum.c.
References FIX2LONG, FIXNUM_MAX, FIXNUM_MIN, FIXNUM_P, INT2FIX, isinf(), isnan, Qnil, rb_big_cmp(), rb_dbl2big(), RFLOAT_VALUE, and big_div_struct::yn.
Referenced by rb_float_gt().
Definition at line 5335 of file bignum.c.
References FIX2LONG, FIXNUM_P, isinf(), isnan, LONG_MAX, LONG_MIN, Qfalse, Qtrue, rb_big_eq(), rb_dbl2big(), RFLOAT_VALUE, and big_div_struct::yn.
Referenced by rb_float_equal().
int rb_integer_pack | ( | VALUE | val, |
void * | words, | ||
size_t | numwords, | ||
size_t | wordsize, | ||
size_t | nails, | ||
int | flags | ||
) |
Definition at line 3529 of file bignum.c.
References BDIGIT, bdigit_roomof, BDIGITS, BIGDN, BIGLO, BIGNUM_LEN, BIGNUM_POSITIVE_P, FIX2LONG, FIXNUM_P, numberof, RB_GC_GUARD, and rb_to_int().
Referenced by rb_big_pack().
VALUE rb_integer_unpack | ( | const void * | words, |
size_t | numwords, | ||
size_t | wordsize, | ||
size_t | nails, | ||
int | flags | ||
) |
Definition at line 3615 of file bignum.c.
Referenced by rb_big_unpack().
Definition at line 4515 of file bignum.c.
References rb_str_to_inum().
Definition at line 4226 of file bignum.c.
References len, NIL_P, NULL, rb_cstr_parse_inum(), rb_must_asciicompat(), RSTRING_GETMEM, and StringValue.
Referenced by fun1(), and rb_str2inum().
Definition at line 3140 of file bignum.c.
References BDIGIT, bdigit_roomof, BDIGITS, BIGDN, BIGLO, bignew, BIGNUM_SET_LEN, and SIZEOF_VALUE.
Referenced by rb_int2big(), and rb_uint2inum().
Definition at line 3183 of file bignum.c.
References LONG2FIX, POSFIXABLE, and rb_uint2big().
unsigned long rb_ulong_isqrt | ( | unsigned | long | ) |
Referenced by rb_big_even_p().
STATIC_ASSERT | ( | sizeof_bdigit_dbl | , |
sizeof(BDIGIT_DBL) | = =SIZEOF_BDIGIT_DBL |
||
) |
STATIC_ASSERT | ( | sizeof_bdigit_dbl_signed | , |
sizeof(BDIGIT_DBL_SIGNED) | = =SIZEOF_BDIGIT_DBL |
||
) |
STATIC_ASSERT | ( | sizeof_bdigit | , |
SIZEOF_BDIGIT<= | sizeofBDIGIT | ||
) |
STATIC_ASSERT | ( | sizeof_bdigit_and_dbl | , |
SIZEOF_BDIGIT *2<= | SIZEOF_BDIGIT_DBL | ||
) |
STATIC_ASSERT | ( | bdigit_signedness | ) |
STATIC_ASSERT | ( | bdigit_dbl_signedness | ) |
STATIC_ASSERT | ( | bdigit_dbl_signed_signedness | , |
0 | , | ||
(BDIGIT_DBL_SIGNED) - | 1 | ||
) |
STATIC_ASSERT | ( | rbignum_embed_len_max | , |
BIGNUM_EMBED_LEN_MAX<= | BIGNUM_EMBED_LEN_MASK >> BIGNUM_EMBED_LEN_SHIFT | ||
) |
STATIC_ASSERT | ( | sizeof_long_and_sizeof_bdigit | , |
SIZEOF_BDIGIT % | SIZEOF_LONG = =0 |
||
) |
const char ruby_digitmap[] = "0123456789abcdefghijklmnopqrstuvwxyz" |
Definition at line 38 of file bignum.c.
Referenced by rb_fix2str().