|
From: | Cheng,Jen-Min |
Subject: | FW: [Help-glpk] bigmul in glblib05.c |
Date: | Tue, 5 Jan 2010 05:31:28 -0800 |
-----Original Message----- > 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). |
[Prev in Thread] | Current Thread | [Next in Thread] |