Changeset 314f0a2 in git


Ignore:
Timestamp:
Jul 10, 2012, 6:05:03 PM (11 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'ad2543eab51733612ba7d118afc77edca719600e')
Children:
becbea965e6c5de8e8ab195c7f480cabc295ac0c
Parents:
a35572368be51d820a1f6caf655d85506e77ec52
git-author:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2012-07-10 18:05:03+02:00
git-committer:
Martin Lee <martinlee84@web.de>2012-10-22 22:48:36+02:00
Message:
fix: better multiplication on 32bit machines
File:
1 edited

Legend:

Unmodified
Added
Removed
  • factory/imm.h

    ra355723 r314f0a2  
    301301    long b = imm2int( rhs );
    302302    INT64 result = (INT64)a * (INT64)b;
     303    #if SIZEOF_LONG == 4
     304    if ((result>(INT64)MAXIMMEDIATE)||(result<(INT64)MINIMMEDIATE))
     305    {
     306        InternalCF * res = CFFactory::basic( IntegerDomain, a, true );
     307        return res->mulcoeff( rhs );
     308    }
     309    #else
    303310    if ( ( a!=0L ) && ((result/a!=b)
    304311      ||(result>MAXIMMEDIATE)||(result<MINIMMEDIATE) ) )
     
    307314        return res->mulcoeff( rhs );
    308315    }
     316    #endif
    309317    else
    310318        return int2imm( result );
Note: See TracChangeset for help on using the changeset viewer.