Changeset 2834b5 in git


Ignore:
Timestamp:
Oct 5, 2016, 12:08:06 PM (8 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', '4fa496c5b814dbde0a905c54f0796301d03f6dc9')
Children:
98dcd285d2f98957496ba820d4fc193859ec3c2a
Parents:
8450df62c514daa3379aabafc1fb710c5b3453c9
Message:
fix: avoid overflow
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/surfacesignature.lib

    r8450df r2834b5  
    334334{
    335335   number a,b;
    336    int r;
     336   bigint r;
    337337   a = numerator(n);
    338338   b = denominator(n);
    339    int z = int(number(a));
    340    int y = int(number(b));
     339   bigint z = bigint(a);
     340   bigint y = bigint(b);
    341341   r = z mod y;
    342    int q = (z-r) div y;
    343    number n1 = q;
    344    number n2 = n-n1;
     342   bigint q = (z-r) div y;
     343   number n1 = number(q);
     344   number n2 = number(n-n1);
    345345   return(n2);
    346346}
Note: See TracChangeset for help on using the changeset viewer.