RE: [Help-glpk] bigmul in glblib05.c

2010-01-06 Thread Michael Hennebry
. At least put in a comment. -Original Message- From: Andrew Makhorin [mailto:m...@gnu.org] Sent: Wednesday, January 06, 2010 9:47 AM To: Michael Hennebry Cc: Cheng,Jen-Min; help-glpk@gnu.org Subject: Re: [Help-glpk] bigmul in glblib05.c The statement: unsigned short c = (unsigned short

RE: [Help-glpk] bigmul in glblib05.c

2010-01-06 Thread Cheng,Jen-Min
In the code, I is declared as unsigned int. -Original Message- From: Andrew Makhorin [mailto:m...@gnu.org] Sent: Wednesday, January 06, 2010 9:47 AM To: Michael Hennebry Cc: Cheng,Jen-Min; help-glpk@gnu.org Subject: Re: [Help-glpk] bigmul in glblib05.c >> The sta

Re: [Help-glpk] bigmul in glblib05.c

2010-01-06 Thread Andrew Makhorin
>> The statement: >> >> unsigned short c = (unsigned short)( i & USHRT_MAX); >> >> is absolutely equivalent to: >> >> unsigned short c = (unsigned short)i; > Actually it's not. > The result of the latter statement can be determined > from the value of i and the value of USHRT_MAX. > If i is ne

Re: [Help-glpk] bigmul in glblib05.c

2010-01-06 Thread Michael Hennebry
On Wed, 6 Jan 2010, Andrew Makhorin wrote: These codes are replaced with unsigned short c = (unsigned short)( i & USHRT_MAX); The modified codes can produce 13.75 for vpm2.mps of MIPLIB 2003. I am not sure why you are changing the code. Doesn't the original version work for you? The glpk cod

Re: [Help-glpk] bigmul in glblib05.c

2010-01-06 Thread Andrew Makhorin
> I always prodce debug and release version in order to ensure that > the code work properly. The release version also stopped immediately > after such failure. In MSVC 2008 IDE choose "Project/Properties/Configuration Properties/C++/Code Generation" and make sure that "Basic Runtime Checks" op

Re: [Help-glpk] bigmul in glblib05.c

2010-01-04 Thread Andrew Makhorin
> With MS Visual Studio 2008, unsigned int is four > bytes and unsigned short is two bytes. Not only in ms. It is the general convention accepted in ILP32 and LP64 programming models, which glpk conforms to. For more details please see: http://www.unix.org/version2/whatsnew/lp64_wp.html . >   If