Implements common mathematical number tests.