Why would I want to use GMTLs C math abstraction rather than the regular C math library?
GMTL has abstracted the C math libraries to ensure cross-platform compatibility. If you write an application using GMTL’s math functions, you do not have to make any changes when building on different platforms. The math abstraction is also designed to be type safe. It will work for different mathematical data types such as float and double without having different function syntax for each data type. For instance, on some platforms, the math library is designed solely for double-precision floating point numbers and separate functions are provided for regular float numbers, with an ‘f’ appended to each function name. On such platforms, you have math functions like ‘floor’ & ‘floorf’ as well as ‘cos’ and ‘cosf’. In GMTL, there is only one function name to remember for each type of operation, regardless of the data type. So you could pass either a double or a float to GMTL’s ‘cos’ function to get the cosine value.