FW: [Help-glpk] bigmulin glblib05.c

2010-01-05 Thread Cheng,Jen-Min
Because MSVS 2008 would issue warning for such a conversion, the bigmul is modified as void bigmul(int n, int m, unsigned short x[], unsigned short y[]) { int i, j; unsigned int t; union { unsigned int uint; struct { unsigned short ush1, ush2 ;} ush;

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

2010-01-05 Thread Cheng,Jen-Min
-Original Message- From: Andrew Makhorin [mailto:m...@gnu.org] Sent: Monday, January 04, 2010 11:58 AM To: Cheng,Jen-Min Cc: help-glpk@gnu.org Subject: Re: [Help-glpk] bigmul in glblib05.c > With MS Visual Studio 2008, unsigned int is four > bytes and unsigned sho

Re: [Help-glpk] Transposing result table using MathProg

2010-01-05 Thread xypron
Hello Noli, the model belows will read your input data from a csv file and output it to another csv file with one column per value of period. Best regards Xypron http://old.nabble.com/file/p27026678/input.csv input.csv http://old.nabble.com/file/p27026678/test.mod test.mod # Read a csv file

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

2010-01-05 Thread Andrew Makhorin
> Run-Time Check Failure #1 - A cast to a smaller data type has > caused a loss of data. If this was intentional, you should mask > the source of the cast with the appropriate bitmask. For > example: > > char c = (i & 0xFF); This advice is helpful for quiche eaters only :) > Because MSVS 2008 wo

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

2010-01-05 Thread Michael Hennebry
On Tue, 5 Jan 2010, Andrew Makhorin wrote: Run-Time Check Failure #1 - A cast to a smaller data type has caused a loss of data. If this was intentional, you should mask the source of the cast with the appropriate bitmask. For example: char c = (i & 0xFF); What this does is implementation dep

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

2010-01-05 Thread Cheng,Jen-Min
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. Thanks. -Original Message- From: Michael Hennebry [mailto:henne...@web.cs.ndsu.nodak.edu] Sent: Tuesday, January 05, 2010 10:44 AM To

[Help-glpk] bigmul in glblib05.c

2010-01-05 Thread Andrew Makhorin
> 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 code is highly portable, and there is no