you mean
```c++
return float_X(math::abs(position_x- L_x)<=float_X(0.5*L_x));
```
or 
```c++
return float_X(math::abs(position_x/L_x)<=float_X(1.0));
```
since `position_x`is not equal to `x`.