isl_qpolynomial_fold_fold_on_domain: return infty on unbounded input
commitc0ffea53c38edd83bfc8559aa1560f3ac27e4f56
authorSven Verdoolaege <skimo@kotnet.org>
Sat, 2 May 2015 14:21:19 +0000 (2 16:21 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Tue, 16 Jun 2015 06:57:40 +0000 (16 08:57 +0200)
tree755c48788958a3a6cc4440dee588fa4543dae7fb
parentb587fbec151435eb0dcd90e30fbf367b1c30b637
isl_qpolynomial_fold_fold_on_domain: return infty on unbounded input

When computing a bound over an infinite domain, a missing bound
is turned into positive or negative infinity and this value would
simply be plugged into the input polynomial, typically resulting
in NaN because the substitution engine is unaware of the signs
of the other variables and because it cannot tell if these
infinite values may cancel out.

Detect the situations where this may happen and produce
a +infty or -infty result instead.  This result may be wildly
inaccurate, but it is always a correct bound and it should
be no worse than returning NaN.

Requested-by: Fabrice RASTELLO <fabrice.rastello@inria.fr>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_range.c
isl_test.c