65template <
int W>
class sc_bigint;
74template <
int W>
class sc_biguint;
85#if !defined(SC_BIGINT_CONFIG_TEMPLATE_CLASS_HAS_NO_BASE_CLASS)
105 #if defined(SC_BIGINT_CONFIG_TEMPLATE_CLASS_HAS_STORAGE)
107 #elif defined(SC_BIGINT_CONFIG_BASE_CLASS_HAS_STORAGE)
113 #if defined(SC_BIGINT_CONFIG_TEMPLATE_CLASS_HAS_STORAGE)
115 #elif defined(SC_BIGINT_CONFIG_BASE_CLASS_HAS_STORAGE)
121 #if defined(SC_BIGINT_CONFIG_TEMPLATE_CLASS_HAS_STORAGE)
123 #elif defined(SC_BIGINT_CONFIG_BASE_CLASS_HAS_STORAGE)
130 #if defined(SC_BIGINT_CONFIG_TEMPLATE_CLASS_HAS_STORAGE)
132 #elif defined(SC_BIGINT_CONFIG_BASE_CLASS_HAS_STORAGE)
139 #if defined(SC_BIGINT_CONFIG_TEMPLATE_CLASS_HAS_STORAGE)
141 #elif defined(SC_BIGINT_CONFIG_BASE_CLASS_HAS_STORAGE)
147 #if defined(SC_BIGINT_CONFIG_TEMPLATE_CLASS_HAS_STORAGE)
149 #elif defined(SC_BIGINT_CONFIG_BASE_CLASS_HAS_STORAGE)
155 #if defined(SC_BIGINT_CONFIG_TEMPLATE_CLASS_HAS_STORAGE)
157 #elif defined(SC_BIGINT_CONFIG_BASE_CLASS_HAS_STORAGE)
164 #if defined(SC_BIGINT_CONFIG_TEMPLATE_CLASS_HAS_STORAGE)
166 #elif defined(SC_BIGINT_CONFIG_BASE_CLASS_HAS_STORAGE)
169 { a->to_sc_signed(*
this); }
172 #if defined(SC_BIGINT_CONFIG_TEMPLATE_CLASS_HAS_STORAGE)
174 #elif defined(SC_BIGINT_CONFIG_BASE_CLASS_HAS_STORAGE)
180 #if defined(SC_BIGINT_CONFIG_TEMPLATE_CLASS_HAS_STORAGE)
182 #elif defined(SC_BIGINT_CONFIG_BASE_CLASS_HAS_STORAGE)
188 #if defined(SC_BIGINT_CONFIG_TEMPLATE_CLASS_HAS_STORAGE)
190 #elif defined(SC_BIGINT_CONFIG_BASE_CLASS_HAS_STORAGE)
196 #if defined(SC_BIGINT_CONFIG_TEMPLATE_CLASS_HAS_STORAGE)
198 #elif defined(SC_BIGINT_CONFIG_BASE_CLASS_HAS_STORAGE)
204 #if defined(SC_BIGINT_CONFIG_TEMPLATE_CLASS_HAS_STORAGE)
206 #elif defined(SC_BIGINT_CONFIG_BASE_CLASS_HAS_STORAGE)
212 #if defined(SC_BIGINT_CONFIG_TEMPLATE_CLASS_HAS_STORAGE)
214 #elif defined(SC_BIGINT_CONFIG_BASE_CLASS_HAS_STORAGE)
220 #if defined(SC_BIGINT_CONFIG_TEMPLATE_CLASS_HAS_STORAGE)
222 #elif defined(SC_BIGINT_CONFIG_BASE_CLASS_HAS_STORAGE)
228 #if defined(SC_BIGINT_CONFIG_TEMPLATE_CLASS_HAS_STORAGE)
230 #elif defined(SC_BIGINT_CONFIG_BASE_CLASS_HAS_STORAGE)
236 #if defined(SC_BIGINT_CONFIG_TEMPLATE_CLASS_HAS_STORAGE)
238 #elif defined(SC_BIGINT_CONFIG_BASE_CLASS_HAS_STORAGE)
244 #if defined(SC_BIGINT_CONFIG_TEMPLATE_CLASS_HAS_STORAGE)
246 #elif defined(SC_BIGINT_CONFIG_BASE_CLASS_HAS_STORAGE)
252 #if defined(SC_BIGINT_CONFIG_TEMPLATE_CLASS_HAS_STORAGE)
254 #elif defined(SC_BIGINT_CONFIG_BASE_CLASS_HAS_STORAGE)
260 #if defined(SC_BIGINT_CONFIG_TEMPLATE_CLASS_HAS_STORAGE)
262 #elif defined(SC_BIGINT_CONFIG_BASE_CLASS_HAS_STORAGE)
270 #if defined(SC_BIGINT_CONFIG_TEMPLATE_CLASS_HAS_STORAGE)
272 #elif defined(SC_BIGINT_CONFIG_BASE_CLASS_HAS_STORAGE)
277 explicit sc_bigint(
const sc_fxval_fast& v )
278 #if defined(SC_BIGINT_CONFIG_TEMPLATE_CLASS_HAS_STORAGE)
280 #elif defined(SC_BIGINT_CONFIG_BASE_CLASS_HAS_STORAGE)
286 #if defined(SC_BIGINT_CONFIG_TEMPLATE_CLASS_HAS_STORAGE)
288 #elif defined(SC_BIGINT_CONFIG_BASE_CLASS_HAS_STORAGE)
293 explicit sc_bigint(
const sc_fxnum_fast& v )
294 #if defined(SC_BIGINT_CONFIG_TEMPLATE_CLASS_HAS_STORAGE)
296 #elif defined(SC_BIGINT_CONFIG_BASE_CLASS_HAS_STORAGE)
375 const sc_bigint<W>&
operator = (
const sc_fxval_fast& v )
378 const sc_bigint<W>&
operator = (
const sc_fxnum& v )
381 const sc_bigint<W>&
operator = (
const sc_fxnum_fast& v )
410 result = (int)
digit[0];
420 result = (
unsigned int)
digit[0];
467 unsigned long result = (
sizeof(
unsigned long) < 5 ) ?
to_uint() :
to_uint64();
632#if defined(SC_BIGINT_CONFIG_TEMPLATE_CLASS_HAS_STORAGE)
638#elif defined(SC_BIGINT_CONFIG_TEMPLATE_CLASS_HAS_NO_BASE_CLASS)
647 unsigned long long tmp = (std::make_signed<sc_digit>::type) (
digit[
HOD] << shift);
652#if defined(SC_BIGINT_CONFIG_TEMPLATE_CLASS_HAS_NO_BASE_CLASS)
699#if defined(SC_BIGINT_CONFIG_TEMPLATE_CLASS_HAS_NO_BASE_CLASS)
#define SC_DIGIT_INDEX(BIT_INDEX)
#define SC_BIT_INDEX(BIT)
#define SC_DIGIT_COUNT(BIT_WIDTH)
#define SC_BASE_VEC_DIGITS
unsigned long long uint64
const sc_bigint< W > & operator>>=(int v)
unsigned int to_uint() const
const sc_signed operator<<(const sc_unsigned &v) const
const sc_signed & sc_signed_proxy() const
const sc_bigint< W > & operator<<=(const sc_signed &v)
const sc_signed operator>>(int v) const
sc_bigint(const sc_signed_subref &v)
sc_bigint(const sc_bv_base &v)
sc_bigint(const sc_bigint< WO > &v)
sc_signed_bitref & operator[](int i)
sc_bigint< W > & operator*=(const sc_signed &v)
const sc_bigint< W > & operator=(const sc_signed_subref_r &v)
sc_bigint< W > & operator|=(const sc_signed &v)
sc_bigint(unsigned long v)
const sc_bigint< W > & operator>>=(const sc_unsigned &v)
const sc_digit * get_digits() const
const std::string to_string(sc_numrep numrep, bool w_prefix) const
sc_bigint< W > & operator+=(const sc_signed &v)
const sc_signed operator>>(const sc_signed &v) const
const sc_signed_bitref_r & bit(int i) const
sc_signed_subref & range(int i, int j)
const sc_bigint< W > operator-()
sc_digit compile_time_digits[DIV_CEIL(W)>SC_BASE_VEC_DIGITS?DIV_CEIL(W):1]
const sc_signed_subref_r & range(int i, int j) const
sc_bigint< W > & operator++()
const sc_signed operator<<(const sc_signed &v) const
sc_bigint(const sc_lv_base &v)
sc_signed_subref & operator()(int i, int j)
const sc_signed operator>>(const sc_unsigned &v) const
sc_bigint(const sc_unsigned &v)
sc_bigint(const sc_signed &v)
const sc_bigint< W > & operator<<=(int v)
sc_bigint< W > & operator%=(const sc_signed &v)
sc_bigint(const sc_generic_base< T > &a)
sc_bigint(unsigned int v)
unsigned long to_ulong() const
const sc_bigint< W > operator~()
const sc_bigint< W > & operator>>=(const sc_signed &v)
sc_bigint< W > & operator/=(const sc_signed &v)
sc_signed & sc_signed_proxy()
const std::string to_string(sc_numrep numrep=SC_DEC) const
const sc_bigint< W > & operator=(const sc_bigint< W > &other)
int get_actual_length() const
sc_bigint< W > & operator&=(const sc_signed &v)
sc_bigint< W > & operator--()
sc_bigint< W > & operator-=(const sc_signed &v)
sc_bigint(const sc_bigint< W > &v)
sc_signed_bitref & bit(int i)
sc_bigint< W > & operator^=(const sc_signed &v)
sc_bigint(const sc_biguint< WO > &v)
sc_bigint(const sc_unsigned_subref &v)
const sc_bigint< W > & operator<<=(const sc_unsigned &v)
const sc_signed operator<<(int v) const
sc_signed_subref & range(int i, int j)
virtual int concat_length(bool *xz_present_p) const
const std::string to_string(sc_numrep numrep=SC_DEC) const
sc_signed(int nb=sc_length_param().len())
sc_signed_bitref & bit(int i)