/*CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
C                                                                             C
C  COMPUTE MERTENS FUNCTION (using Deleglise and Rivat's algorithm)           C
C  08/31/15 (DKC)							      C
C                                                                             C
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC*/
#include <math.h>
double fastloc(unsigned int x1, unsigned int u, char *mob, int *M);
double fasthic(unsigned int x1, unsigned int u, char *mob, int *M);
int fastriv(unsigned int x1, unsigned int u, char *mobb, int *M) {
double f1,f2,f3;
f1=fastloc(x1,u,mobb,M);
f2=fasthic(x1,u,mobb,M);
f3=(double)M[u-1]-f1-f2;
return((int)f3);
}