[PPL-devel] Floating Point Constraints in PPL

Radoslav Ivanov rivanov at seas.upenn.edu
Wed Mar 12 16:46:11 CET 2014


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.

Regards,
Rado


On Wed, Mar 12, 2014 at 3:25 AM, Roberto Bagnara <bagnara at cs.unipr.it>wrote:

> On 03/11/14 21:15, Radoslav Ivanov wrote:
> > My name is Radoslav Ivanov and I am a PhD student at the PRECISE lab
> > at the University of Pennsylvania.
> >
> > I am trying to perform some polyhedra operations using PPL (in
> > C++). However, I am not sure if it is possible to encode constraints
> > with non-integer values. Can you please tell me if this is possible
> > and if yes, what type I should use?
>
> Dear Radoslav,
>
> it is always possible to encode constraints with non-integer coefficients
> into constraints with integer coefficients, which can then be treated
> with the PPL.
>
> See ppl/demos/ppl_lcdd.cc as an example: the function normalize()
> takes an (input) vector of rational coefficients, an (output) vector
> of corresponding integer coefficients and an (input/output) accumulated
> denominator for the conversion.
>
> If you tell us what are you trying to achieve, perhaps we can provide
> more useful advice.
> Kind regards,
>
>     Roberto
>
> --
>      Prof. Roberto Bagnara
>
> Applied Formal Methods Laboratory - University of Parma, Italy
> mailto:bagnara at cs.unipr.it
>                               BUGSENG srl - http://bugseng.com
>                               mailto:roberto.bagnara at bugseng.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cs.unipr.it/pipermail/ppl-devel/attachments/20140312/f6b9404e/attachment.htm>


More information about the PPL-devel mailing list