py: Fix float to int conversion for large exponents.
This commit is contained in:
committed by
Damien George
parent
ffc96a901a
commit
6e0b6d02db
6
py/mpz.h
6
py/mpz.h
@@ -85,6 +85,9 @@ void mpz_deinit(mpz_t *z);
|
||||
mpz_t *mpz_zero(void);
|
||||
mpz_t *mpz_from_int(mp_int_t i);
|
||||
mpz_t *mpz_from_ll(long long i, bool is_signed);
|
||||
#if MICROPY_PY_BUILTINS_FLOAT
|
||||
mpz_t *mpz_from_float(mp_float_t i);
|
||||
#endif
|
||||
mpz_t *mpz_from_str(const char *str, mp_uint_t len, bool neg, mp_uint_t base);
|
||||
void mpz_free(mpz_t *z);
|
||||
|
||||
@@ -93,6 +96,9 @@ mpz_t *mpz_clone(const mpz_t *src);
|
||||
void mpz_set(mpz_t *dest, const mpz_t *src);
|
||||
void mpz_set_from_int(mpz_t *z, mp_int_t src);
|
||||
void mpz_set_from_ll(mpz_t *z, long long i, bool is_signed);
|
||||
#if MICROPY_PY_BUILTINS_FLOAT
|
||||
void mpz_set_from_float(mpz_t *z, mp_float_t src);
|
||||
#endif
|
||||
mp_uint_t mpz_set_from_str(mpz_t *z, const char *str, mp_uint_t len, bool neg, mp_uint_t base);
|
||||
|
||||
bool mpz_is_zero(const mpz_t *z);
|
||||
|
||||
Reference in New Issue
Block a user