128 |
|
|
129 |
static const char s_bignum[] = "bignum"; |
static const char s_bignum[] = "bignum"; |
130 |
|
|
131 |
SCM_C_INLINE SCM |
SCM_C_INLINE_KEYWORD SCM |
132 |
scm_i_mkbig () |
scm_i_mkbig () |
133 |
{ |
{ |
134 |
/* Return a newly created bignum. */ |
/* Return a newly created bignum. */ |
137 |
return z; |
return z; |
138 |
} |
} |
139 |
|
|
140 |
SCM_C_INLINE static SCM |
SCM_C_INLINE_KEYWORD static SCM |
141 |
scm_i_clonebig (SCM src_big, int same_sign_p) |
scm_i_clonebig (SCM src_big, int same_sign_p) |
142 |
{ |
{ |
143 |
/* Copy src_big's value, negate it if same_sign_p is false, and return. */ |
/* Copy src_big's value, negate it if same_sign_p is false, and return. */ |
148 |
return z; |
return z; |
149 |
} |
} |
150 |
|
|
151 |
SCM_C_INLINE int |
SCM_C_INLINE_KEYWORD int |
152 |
scm_i_bigcmp (SCM x, SCM y) |
scm_i_bigcmp (SCM x, SCM y) |
153 |
{ |
{ |
154 |
/* Return neg if x < y, pos if x > y, and 0 if x == y */ |
/* Return neg if x < y, pos if x > y, and 0 if x == y */ |
158 |
return result; |
return result; |
159 |
} |
} |
160 |
|
|
161 |
SCM_C_INLINE SCM |
SCM_C_INLINE_KEYWORD SCM |
162 |
scm_i_dbl2big (double d) |
scm_i_dbl2big (double d) |
163 |
{ |
{ |
164 |
/* results are only defined if d is an integer */ |
/* results are only defined if d is an integer */ |
167 |
return z; |
return z; |
168 |
} |
} |
169 |
|
|
170 |
SCM_C_INLINE double |
SCM_C_INLINE_KEYWORD double |
171 |
scm_i_big2dbl (SCM b) |
scm_i_big2dbl (SCM b) |
172 |
{ |
{ |
173 |
double result = mpz_get_d (SCM_I_BIG_MPZ (b)); |
double result = mpz_get_d (SCM_I_BIG_MPZ (b)); |
175 |
return result; |
return result; |
176 |
} |
} |
177 |
|
|
178 |
SCM_C_INLINE SCM |
SCM_C_INLINE_KEYWORD SCM |
179 |
scm_i_normbig (SCM b) |
scm_i_normbig (SCM b) |
180 |
{ |
{ |
181 |
/* convert a big back to a fixnum if it'll fit */ |
/* convert a big back to a fixnum if it'll fit */ |