http://www.cyberforum.ru/numerical-methods/thread127295.html