Hi,

first of all: when you use the lp2poly script you will get a polytope with floating point coordinates. As floats are "evil" you might want to calculate with Rationals instead. So use:

Code: Select all

```
$p = convert_to<Rational>(lp2poly('test.lp'));
```

as described

here or you input the inequalities directly into polymake, without doing the lp-format conversion.

As for your example: The floating point numbers "-1.665334537e-16" and "3.330669074e-16" are actually zero (rounding issues don't happen with rational coordinates).

But other than that I cannot reproduce your output. When I take your lp file and ask for the vertices (with rational or floating coordinates; with the release and the perpetual beta version of polymake) I get only \( (1, -1, -2, -3) \) as a vertex. And when you look at it more closely you see that the ray \(\lambda(-1, 0, -1)\) violates the equation

**c2: - a2 + a3 = -1**. So the output you posted here, is somewhat strange.

From where I am standing: your case is actually a bounded polytope. It is the convex hull of the point \((-1,-2,-3)\in \mathbb{R}^3\), so everything is fine here

But back to your question:

When you have an unbounded but pointed polyhedron, you want to transform it in a way such that it lies in the positive orthant (meaning every coordinate is positive). That is basic linear algebra (rotating, translating, basis transformation). Then you can use the

**bound** function to do the projective transformation in order to create the bounded version of that polyhedron. Or you do it yourself by transforming the hyperplane \((1,0,\ldots,0)\) to \((1,-1,\ldots,-1)\), for example.

Then you sample everything and reverse every transformation you did before to get the points in your polytope.