help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Cheng,Jen-Min
Subject: FW: [Help-glpk] bigmul in glblib05.c
Date: Tue, 5 Jan 2010 05:31:28 -0800

 

 

 

 

 

 

-----Original Message-----
From: Andrew Makhorin [mailto:address@hidden
Sent: Monday, January 04, 2010 11:58 AM
To: Cheng,Jen-Min
Cc: address@hidden
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).

 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]