<div dir="ltr"><div><div>Thank you, Roberto! This function is exactly what I was looking for. I guess this mpq_class converts floats into pairs of numerators and denominators.<br><br></div>Regards,<br></div>Rado<br></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Wed, Mar 12, 2014 at 3:25 AM, Roberto Bagnara <span dir="ltr"><<a href="mailto:bagnara@cs.unipr.it" target="_blank">bagnara@cs.unipr.it</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">On 03/11/14 21:15, Radoslav Ivanov wrote:<br>
> My name is Radoslav Ivanov and I am a PhD student at the PRECISE lab<br>
> at the University of Pennsylvania.<br>
><br>
> I am trying to perform some polyhedra operations using PPL (in<br>
> C++). However, I am not sure if it is possible to encode constraints<br>
> with non-integer values. Can you please tell me if this is possible<br>
> and if yes, what type I should use?<br>
<br>
</div></div>Dear Radoslav,<br>
<br>
it is always possible to encode constraints with non-integer coefficients<br>
into constraints with integer coefficients, which can then be treated<br>
with the PPL.<br>
<br>
See ppl/demos/ppl_lcdd.cc as an example: the function normalize()<br>
takes an (input) vector of rational coefficients, an (output) vector<br>
of corresponding integer coefficients and an (input/output) accumulated<br>
denominator for the conversion.<br>
<br>
If you tell us what are you trying to achieve, perhaps we can provide<br>
more useful advice.<br>
Kind regards,<br>
<br>
    Roberto<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
     Prof. Roberto Bagnara<br>
<br>
Applied Formal Methods Laboratory - University of Parma, Italy<br>
mailto:<a href="mailto:bagnara@cs.unipr.it">bagnara@cs.unipr.it</a><br>
                              BUGSENG srl - <a href="http://bugseng.com" target="_blank">http://bugseng.com</a><br>
                              mailto:<a href="mailto:roberto.bagnara@bugseng.com">roberto.bagnara@bugseng.com</a><br>
</font></span></blockquote></div><br></div>