Refactor numeric.c

It should return values immediately.