Universal multi-function CORDIC