Software-Based Approximate Computing For Mathematical Functions