evalue.c: reduce_evalue: reduce floor with constant argument
[barvinok/uuh.git] / polysign_cddf.cc
blobadf33fd13588ef260a6eb1dcda1e25716a8707fc
1 #include <math.h>
3 #define DD_LPType ddf_LPType
4 #define DD_CreateLPData ddf_CreateLPData
5 #define DD_LPObjectiveType ddf_LPObjectiveType
6 #define DD_rowrange ddf_rowrange
7 #define DD_colrange ddf_colrange
8 #define DD_Rational ddf_Rational
9 #define DD_FALSE ddf_FALSE
10 #define DD_set_si ddf_set_si
11 #define DD_neg ddf_neg
12 #define DD_ErrorType ddf_ErrorType
13 #define DD_DualSimplex ddf_DualSimplex
14 #define DD_LPSolve ddf_LPSolve
15 #define DD_NoError ddf_NoError
16 #define DD_Optimal ddf_Optimal
17 #define DD_DualInconsistent ddf_DualInconsistent
18 #define DD_LPmin ddf_LPmin
19 #define DD_Inconsistent ddf_Inconsistent
20 #define DD_FreeLPData ddf_FreeLPData
21 #define DD_LPmax ddf_LPmax
22 #define DD_int_sign(sign,obj,val) do { \
23 if (val[0] < -0.5) \
24 sign = -1; \
25 else if (val[0] > 0.5) \
26 sign = 1; \
27 else \
28 sign = 0; \
29 } while (0)
31 #define DD_set_z(a,b) a[0] = VALUE_TO_DOUBLE(b)
32 #define DD_floor(a,b) value_set_si(a,(int)floor(b[0]+ddf_almostzero))
33 #define DD_ceil(a,b) value_set_si(a,(int)ceil(b[0]-ddf_almostzero))
35 #define cdd_polyhedron_affine_sign cddf_polyhedron_affine_sign
36 #define DD_rat_sign(sign,obj,val) do { \
37 if (obj == DD_LPmin) \
38 val[0] -= ddf_almostzero; \
39 else \
40 val[0] += ddf_almostzero; \
41 sign = ddf_sgn(val); \
42 } while (0)
43 #define cdd_constraints_opt cddf_constraints_opt
44 #define cdd_polyhedron_range cddf_polyhedron_range
46 #include "polysign_cdd_template.cc"