diff --git a/lib/poems/eulerparameters.cpp b/lib/poems/eulerparameters.cpp
index 61fcc5fcc2e07184f579866d2732a6b114e38808..032bc7da829aa9fc19cab2a95dc03173cfcb32bc 100644
--- a/lib/poems/eulerparameters.cpp
+++ b/lib/poems/eulerparameters.cpp
@@ -16,7 +16,7 @@
  *_________________________________________________________________________*/
 
 #include "eulerparameters.h"
-#include "math.h"
+#include <cmath>
 
 using namespace std;
 
diff --git a/lib/poems/matrixfun.cpp b/lib/poems/matrixfun.cpp
index 84784436452a8098d407bc5204ffeb80e6ddc039..d193114679dbaf53e90f3e379f0dc31d79ad6691 100644
--- a/lib/poems/matrixfun.cpp
+++ b/lib/poems/matrixfun.cpp
@@ -16,7 +16,7 @@
  *_________________________________________________________________________*/
 
 #include "matrixfun.h"
-#include <math.h>
+#include <cmath>
 #include "fastmatrixops.h"
 #include <cstdlib>
 
diff --git a/lib/poems/system.cpp b/lib/poems/system.cpp
index d3702a6440fb0172374c8c332010b7b3e44ee23b..369213f7d0abdd59bf082eea910f293f19ad8121 100644
--- a/lib/poems/system.cpp
+++ b/lib/poems/system.cpp
@@ -19,7 +19,7 @@
 #include "system.h"
 #include "body.h"
 #include "joint.h"
-#include <math.h>
+#include <cmath>
 
 
 System::System(){
diff --git a/lib/poems/system.h b/lib/poems/system.h
index 39c1f518b31bec03d77a0203a83428ea0ead04a8..1b59395de701a45d87b2ec1a9187c69662b555e8 100644
--- a/lib/poems/system.h
+++ b/lib/poems/system.h
@@ -23,7 +23,7 @@
 #include <iostream>
 #include <fstream>
 #include <string>
-#include <stdio.h>   
+#include <cstdio>   
 #include <iomanip>  
 
 #include "poemslist.h"
diff --git a/lib/poems/workspace.h b/lib/poems/workspace.h
index 83af077832b9490bc1d71cfd66891e8dc1c398bb..5faaf904dc8c3804a41a4b9046835ee615b0216b 100644
--- a/lib/poems/workspace.h
+++ b/lib/poems/workspace.h
@@ -23,7 +23,7 @@
 #include <iostream>
 #include <fstream>
 #include <string>
-#include <stdio.h>   
+#include <cstdio>   
 #include <iomanip>  
 #include <vector>