/****************************************************************************** * * * COMPUTE MERTENS FUNCTION * * 04/02/10 (dkc) * * * ******************************************************************************/ #include <math.h> double sumlo(unsigned int x,unsigned int u, int *mob, int *M) { unsigned int i,j,k,m; double temp,sumb; sumb=0.0; for (m=1; m<=u; m++) { temp=(double)mob[m-1]; j=u/m+1; k=(unsigned int)sqrt((double)(x/m)); for (i=j; i<=k; i++) sumb=sumb+temp*(double)M[x/(m*i)-1]; } return(sumb); }