You need to add -lm to the compilation command.