The Heun functions have wide application in modern physics and are expected to succeed the hypergeometrical functions in the physical problems of the 21st century. The numerical work with those functions, however, is complicated and requires filling the gaps in the theory of the Heun functions and also, creating new algorithms able to work with them efficiently. We propose a new algorithm for s...