memslap needs to link with -lm for math