Added test, code and docs for asnum.