help-glpk
[Top][All Lists]
Advanced

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

[Help-glpk] glpsol, arbitrary precision and large numbers


From: Edd Barrett
Subject: [Help-glpk] glpsol, arbitrary precision and large numbers
Date: Mon, 25 Jun 2012 13:35:13 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

Hi glpk-help,

As part of my research I am attempting to do an interval analysis on 64-bit x64
binaries. This involves working with large numbers in the range [0, 2^64-1].
These numbers suffer from floating point imprecision and this became apparent
when solving with lpsolve, which uses a double for internal representation.

I am wondering if glpk can help here, as I know it can use libgmp.

I tried a simple test:

---8<---
var x, integer;
var y, integer;

minimize f: x + y;

s.t. c1: 1*x = 2^64-1;
s.t. c2: 1*y = 2^64-5;
---8<---

Which gives the result:

---8<---
   No. Column name       Activity     Lower bound   Upper bound
------ ------------    ------------- ------------- -------------
     1 x            *    1.84467e+19
     2 y            *    1.84467e+19
---8<---

I am not sure if the activity column is showing the "exact" result, or if
it has been rounded in printing the result.

I guess my question is, can I model these large numbers with GLPK and if
so, can glpsol print the unrounded outcomes of variables? Is my approach
just fundamentally flawed altogether?

-- 
Best Regards
Edd Barrett

http://www.theunixzoo.co.uk



reply via email to

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