Skip to content

Commit c24db97

Browse files
authored
Merge pull request #199 from jakirkham/fix_sqrt_integral
Cast before and after call to `sqrt`
2 parents ae65b58 + b28e27d commit c24db97

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/library/plan.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ static bool split1D_for_inplace(size_t num, vector<vector<size_t> > &splitNums,
165165

166166
num = num / divide_factor;
167167
//now the remaining num should have even number of pow2, pow3 and pow5 and we can do sqrt
168-
size_t temp = sqrt(num);
168+
size_t temp = (size_t)sqrt((double)num);
169169
vector<size_t> splitVec;
170170
splitVec.push_back(temp*divide_factor);
171171
splitVec.push_back(temp);

0 commit comments

Comments
 (0)