-----Original Message-----
From: Andrew Makhorin [mailto:[email protected]] 
Sent: Monday, January 04, 2010 11:58 AM
To: Cheng,Jen-Min
Cc: [email protected]
Subject: Re: [Help-glpk] bigmul in glblib05.c

 

> 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 the value of the unsigned

> int t is greater than maximum unsigned short, how will x[i+j] =

> (unsigned short)t; be executed?

 

Since t is unsigned int, (unsigned short)t is its lower 16 bits,

i.e. it is the same as t % 65536U or t & 0xFFFFU.

 

FYI:

The routines bigmul and bigdiv implement algorithms from "The Art

of Computer Programming" by Don Knuth (the second volume).

 

<<image001.png>>

_______________________________________________
Help-glpk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-glpk

Reply via email to