To be honest, this solution is sh.. anyway. 
Do you have the double truncation warning at mac as well? It seams to be just an issue to include the right math header. <tgmath.h> works for this case but fails on other places with pow().