Update and rename mathfuncs.c to basemath.c