From 2a1f3e0f645c4e3bc1728b80cb20164a0cfa60af Mon Sep 17 00:00:00 2001 From: geay Date: Wed, 30 Apr 2014 16:56:17 +0200 Subject: [PATCH] Windows compilation. --- src/MEDCoupling/MEDCouplingIMesh.cxx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/MEDCoupling/MEDCouplingIMesh.cxx b/src/MEDCoupling/MEDCouplingIMesh.cxx index aecd3b313..16dc17763 100644 --- a/src/MEDCoupling/MEDCouplingIMesh.cxx +++ b/src/MEDCoupling/MEDCouplingIMesh.cxx @@ -27,7 +27,6 @@ #include #include #include -#include using namespace ParaMEDMEM; @@ -834,9 +833,12 @@ int MEDCouplingIMesh::FindIntRoot(int val, int order) else//order==3 { double retf(std::pow(val,0.3333333333333333)); - int ret((int)round(retf)); - if(ret*ret*ret!=val) + int ret((int)retf),ret2(ret+1); + if(ret*ret*ret!=val || ret2*ret2*ret2!=val) throw INTERP_KERNEL::Exception("MEDCouplingIMesh::FindIntRoot : the input val is not a perfect cublic root !"); - return ret; + if(ret*ret*ret==val) + return ret; + else + return ret2; } } -- 2.39.2