avoid repeat check of math functions