codes for commonly used math functions