Fix sig11 when dividing large bignums
parent
14a1c0905f
commit
761dab4188
|
@ -105,3 +105,10 @@ unit-test
|
|||
[ t ] [ 0 >bignum zero? ] unit-test
|
||||
|
||||
[ 4294967280 ] [ 268435455 >fixnum 16 fixnum* ] unit-test
|
||||
|
||||
[ 23603949310011464311086123800853779733506160743636399259558684142844552151041 ]
|
||||
[
|
||||
1957739506503920732625800353008742584087090810400921800808997218266517557963281171906190947801528098188887586755474449585677502695226712388326288208691204
|
||||
79562815144503850065234921197651376510595262628033069372760833939060637564931
|
||||
bignum-mod
|
||||
] unit-test
|
||||
|
|
|
@ -847,7 +847,8 @@ bignum_divide_unsigned_large_denominator(bignum_type numerator,
|
|||
}
|
||||
|
||||
REGISTER_BIGNUM(u);
|
||||
q = bignum_trim (q);
|
||||
if(q)
|
||||
q = bignum_trim (q);
|
||||
UNREGISTER_BIGNUM(u);
|
||||
|
||||
REGISTER_BIGNUM(q);
|
||||
|
|
|
@ -231,8 +231,8 @@ INLINE bool root_push_alien(const void *ptr)
|
|||
#define UNREGISTER_C_STRING(obj) \
|
||||
if(obj##_root) obj = alien_offset(root_pop())
|
||||
|
||||
#define REGISTER_BIGNUM(obj) root_push(tag_bignum(obj))
|
||||
#define UNREGISTER_BIGNUM(obj) obj = (untag_bignum_fast(root_pop()))
|
||||
#define REGISTER_BIGNUM(obj) if(obj) root_push(tag_bignum(obj))
|
||||
#define UNREGISTER_BIGNUM(obj) if(obj) obj = (untag_bignum_fast(root_pop()))
|
||||
|
||||
INLINE void *allot_zone(F_ZONE *z, CELL a)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue