Changeset 05c687e in git


Ignore:
Timestamp:
Jul 18, 2020, 10:10:32 PM (4 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', '3720ae8bfcff4a4649ee98a15552089151d2d59b')
Children:
6f87075ce049200dd1513865e0d9cfb1dd263987
Parents:
9daa8d134122c4a1c046f05940e8817eac5c9b34
Message:
fix: int overflow in binom: check
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libpolys/polys/simpleideals.cc

    r9daa8d r05c687e  
    931931  {
    932932    result *= n-r+i;
    933     if (result<0)
    934     {
    935       WarnS("overflow in binomials");
    936       return 0;
    937     }
    938933    result /= i;
    939934  }
    940   if (result>MAX_INT)
    941   {
    942     Werror("int overflow in binom");
    943     result=MAX_INT;
     935  if (result>MAX_INT_VAL)
     936  {
     937    WarnS("overflow in binomials");
     938    result=0;
    944939  }
    945940  return (int)result;
Note: See TracChangeset for help on using the changeset viewer.