Update math.c
Merge pull request #2553 from bggd/patch-6

Fix build failed on VS2012
Use sizeof() instead of strlen().
Merge pull request #2555 from cubicdaiya/issues/reduce_strlen

Use sizeof() instead of strlen().