  In this paper, we consider the final state problem for the nonlinear
Schr\"odinger equation with a homogeneous nonlinearity which is of the long
range critical order and is not necessarily a polynomial, in one and two space
dimensions. As the nonlinearity is the critical order, the possible asymptotic
behavior depends on the shape of the nonlinearity. The aim here is to give a
sufficient condition on the nonlinearity to construct a modified wave operator.
To deal with a non-polynomial nonlinearity, we decompose it into a resonant
part and a non-resonant part via the Fourier series expansion. Our sufficient
condition is then given in terms of the Fourier coefficients. In particular, we
need to pay attention to the decay of the Fourier coefficients since the
non-resonant part is an infinite sum in general.
