Algorithms for optoelectronics implementation of trigonometric functions based on modified signed-digit numbers