Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#3556 Bignum modulo bug

obsolete: 8.5a5
closed-fixed
Don Porter
5
2006-10-30
2006-10-27
Peter Spjuth
No

(unix) 49 % info pat
8.5a5
(unix) 50 % expr 5 % 23426342852374562476253472
23426342852374562476253477
(unix) 51 % expr -5 % 23426342852374562476253472
-5

There is an error in sign interpretation
for this special case.

tclExecute.c line 3799:
if ((l1 > 0) ^ big2.sign) {
should be
if ((l1 > 0) ^ (big2.sign == MP_ZPOS)) {

Same in line 3847

Discussion

  • Don Porter
    Don Porter
    2006-10-30

    • status: open --> closed-fixed
     
  • Don Porter
    Don Porter
    2006-10-30

    Logged In: YES
    user_id=80530

    right you are. committing fix
    with tests...