Révision 164
pobysoPythonSage/src/sageMpfr.spyx (revision 164) | ||
---|---|---|
66 | 66 |
else: |
67 | 67 |
return(min_prec) |
68 | 68 |
# |
69 |
cpdef min_mpfr_size(int p): |
|
69 |
cpdef min_mpfr_size(unsigned long int p):
|
|
70 | 70 |
""" |
71 | 71 |
Compute the minimum number of bits necessary to represent |
72 | 72 |
the MPFR value pointed by the mpfr_t pointer p (hence the int type). |
... | ... | |
83 | 83 |
|
84 | 84 |
cpdef free_mpfi_num(unsigned long int mpfiNum): |
85 | 85 |
""" |
86 |
Free a MPFI interval pointed by mpfiNum (hece the int type). |
|
86 |
Free a MPFI interval pointed by mpfiNum (hece the unsigned long int type).
|
|
87 | 87 |
""" |
88 | 88 |
# We use the "array trick" to workaround the pointer dereferencing |
89 | 89 |
# issue (in Cython there is no unary operator "*"). |
... | ... | |
139 | 139 |
# are broken since the expected precision (from the class attribute) is not |
140 | 140 |
# the actual precision. |
141 | 141 |
# |
142 |
cpdef s_rn_value(RealNumber x, int p): |
|
142 |
cpdef s_rn_value(RealNumber x, unsigned long int p):
|
|
143 | 143 |
mpfr_clear(x.value) |
144 | 144 |
mpfr_init2(x.value, mpfr_get_prec((<mpfr_t *>p)[0])) |
145 | 145 |
#x.__prec = mpfr_get_prec(x.value) |
Formats disponibles : Unified diff