add reference functions to number theory tests and make more integer tests run