diff --git a/Code/IO/otbMapFileProductWriter.txx b/Code/IO/otbMapFileProductWriter.txx
index d306fc0bf08da41a2ba7199a577b7a09eb77a841..c76b5aba2ada3a502c06574a4c9d84ba8ea868f7 100644
--- a/Code/IO/otbMapFileProductWriter.txx
+++ b/Code/IO/otbMapFileProductWriter.txx
@@ -213,7 +213,8 @@ MapFileProductWriter<TInputImage>
     m_CurrentDepth = depth;
 
     // Resample image to the max Depth
-    int sampleRatioValue = static_cast<int>(vcl_pow(2., (maxDepth - depth)));
+//    int sampleRatioValue = static_cast<int>(vcl_pow(2., (maxDepth - depth)));
+    int sampleRatioValue = 1 << (maxDepth - depth); // 2^(maxDepth - depth)
 
     if (sampleRatioValue > 1)
       {