| 148 | |
| 149 | template<class A, class B> |
| 150 | ExecStatus |
| 151 | Tan<A,B>::post(Home home, A x0, B x1) { |
| 152 | if (x0 == x1) { |
| 153 | #define I0_PI_2I FloatVal(0,pi_half_upper()) |
| 154 | if (I0_PI_2I.in(x0.max())) GECODE_ME_CHECK(x0.lq(home, 0)); |
| 155 | if (I0_PI_2I.in(-x0.min())) GECODE_ME_CHECK(x0.gq(home, 0)); |
| 156 | #undef I0_PI_2I |
| 157 | } |
| 158 | GECODE_ES_CHECK(dopropagate(home,x0,x1)); |
| 159 | (void) new (home) Tan<A,B>(home,x0,x1); |
| 160 | return ES_OK; |
| 161 | } |
| 162 | |
| 163 | template<class A, class B> |
| 164 | forceinline |