numerics.py: clean up / remove duplication of numbers
numerics.py: add some error checking