Numerical studies of Siberian snakes and spin rotators for RHIC