rewrite is_udec(), is_sdec() and tests for this