portability improvements for Solaris/OpenIndiana

This commit is contained in:
Axel Kohlmeyer
2023-01-19 14:27:32 -05:00
parent 75bd5b3d99
commit 819ab9f2ff
23 changed files with 398 additions and 393 deletions

View File

@ -399,7 +399,7 @@ void PairSNAP::coeff(int narg, char **arg)
// ncoeffall should be (ncoeff+2)*(ncoeff+1)/2
// so, ncoeff = floor(sqrt(2*ncoeffall))-1
ncoeff = sqrt(2*ncoeffall)-1;
ncoeff = sqrt(2.0*ncoeffall)-1;
ncoeffq = (ncoeff*(ncoeff+1))/2;
int ntmp = 1+ncoeff+ncoeffq;
if (ntmp != ncoeffall) {