diff --git a/pub/src/expr.cpp b/pub/src/expr.cpp
index 9a279cbd9a2a153501154216c2bffafbb7fbbd61..8a2163c732e3142a7a4568f4527d9e5d03e9ce32 100644
--- a/pub/src/expr.cpp
+++ b/pub/src/expr.cpp
@@ -196,7 +196,7 @@ void CRef::ref_val( CResult& ret, const CContext& ctx ) const
             } else
                 throw "TOO COMPLICATED: K must not depend on i";
         } else
-            k = (uint) tmp.r + 0.5;
+            k = (uint) (tmp.r + 0.5);
     } else {
         k = ctx.k;
     }
@@ -239,7 +239,7 @@ void CRef::ref_val( CResult& ret, const CContext& ctx ) const
                     throw "invalid reference " + var_info();
                 ret.preset_v( ctx.nv );
                 for( uint i=0; i<ctx.nv; ++i ) {
-                    j = (uint) tmp.v[i]+0.5;
+                    j = (uint)( tmp.v[i]+0.5 );
                     if( j>=f->V.size() )
                         throw "j out of bounds";
                     ret.v[i] = f->V[j]->z[num];
@@ -248,7 +248,7 @@ void CRef::ref_val( CResult& ret, const CContext& ctx ) const
             } else
                 throw "TOO COMPLICATED: J must not depend on i";
         } else
-            j = (uint) tmp.r + 0.5;
+            j = (uint)( tmp.r + 0.5 );
     } else {
         j = ctx.j;
     }
@@ -796,7 +796,7 @@ void CTree::tree_cev( CResult& ret, const CContext& ctx ) const
         ref->tk->tree_val( tmp, ctx );
         if ( tmp.vectorial )
             throw "TOO COMPLICATED: in curves, K must not depend on i";
-        k = (uint) tmp.r + 0.5;
+        k = (uint)( tmp.r + 0.5 );
     } else {
         k = ctx.k;
     }
@@ -817,7 +817,7 @@ void CTree::tree_cev( CResult& ret, const CContext& ctx ) const
         ref->tj->tree_val( tmp, ctx );
         if ( tmp.vectorial )
             throw "TOO COMPLICATED: in curves, J must not depend on i";
-        j = (uint) tmp.r + 0.5;
+        j = (uint)( tmp.r + 0.5 );
     } else {
         j = ctx.j;
     }