Add comprehensive math tests