Refactor numerics to use macro helpers