simplify table lookup functions and remove unused arctan lut