This code extends the Lua math library with the functions available in C99