Simplify the math arrfuncs being created, add sanity checks

Including <math.h> includes the *f variants which didn't seem
to be there before, and the *f variants only have one overload
so don't need a static_cast