An algorithm for calculating the ratio of the Riccati–Bessel functions of the first kind for two values of the complex argument is constructed. It allows one to construct a system of equations for computing the optical field inside a spherical particle by the Mie theory. This algorithm removes all limitations on the values of the diffraction parameter and complex refractive index of the particle material.